Resolve kotlin-stdlib.jar from snap install #384
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In fwcd/vscode-kotlin#101, a user was using snap to install Kotlin. In my last classpath-resolving-fix PR, I could not get snap working (I mostly use M1 Macs these days, which is ARM and have issues installing the kotlin package as it is only provided for x86/x64). Today I found an older machine (x86), and experimented with snap and installed kotlin that way. I could not resolve the location of stdlib directly using the location of kotlinc. kotlinc resolved to some weird snap-location, and stdlib jars seems to be located in
/snap/kotlin/current/lib/. We know from the issue I linked to, and the output the user gave, that the implementation (pre other PR) did not resolve the stdlib location.My solution is to try to resolve a common snap install path directly. This should at least give some support for installs using snap (even though there might not be that many). Hopefully this will make at least the few people installing kotlin using snap happy 🙂