fwcd / fwcd/kotlin-language-server
Replace SourcePath with VFS
- Dominant language
- Kotlin
- Stars
- 2k
- Forks
- 252
- PR merge metrics
- No merged PRs in 30d
Description
The IntelliJ SDK provides a virtual file system ([documented here](https://www.jetbrains.org/intellij/sdk/docs/basics/architectural_overview/virtual_file.html)) that could replace the current source path implementation and would integrate better with #190.
Implementation notes:
* Virtual files have an associated charset and can be manipulated dynamically using `OutputStreamWriter`s.
* The global VFS can be fetched from `VirtualFileManager.getInstance()`
* Parsed `KtFile`s should be managed by the `KotlinCoreEnvironment`
* Updating a build-related file should result in a call to `KotlinCoreEnvironment.updateClasspath` instead of replacing the entire `Compiler` instance (as is currently done in `CompilerClassPath`)
* `SourcePath` should be a shallow abstraction over the VFS or removed entirely
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading the linked IntelliJ virtual file system documentation and inspecting SourcePath, KotlinCoreEnvironment, and CompilerClassPath. The work is done when SourcePath is a shallow VFS abstraction or removed, parsed KtFiles are managed by KotlinCoreEnvironment, and build-file updates call updateClasspath instead of replacing the Compiler.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100