Skip to content

Kotlin installed on Homebrew (on Linux) has a different path to stdlib #257

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
daphil19 opened this issue Feb 2, 2021 · 1 comment
Open
Labels
dependency resolution Related to the project dependency/standard library resolver

Comments

@daphil19
Copy link
Contributor

daphil19 commented Feb 2, 2021

I was working on building the repo inside of gitpod, and was running into issues with resolving the stdlib.

The language server first checks for it through gradle & maven, but since gitpod changes GRADLE_USER_HOME this fails (see #254).

From there, it tries to find kotlinc on $PATH, and then relative paths to the standard library. However, when installing kotlin via homebrew (on linux), there is a wrapper script that delegates off to the actual kotlin installation. This wrapper script results in the relative path breaking, as the relative path to the lib directory is slightly different.

To replicate, one can open a gitpod environment via this link. From there, run brew install kotlin and ./gradlew build

I can't check what homebrew does on mac (since I don't have one), but I would imagine it has a similar issues?

The fix from what I can tell is just to also check the relative path that Homebrew uses to try and find the stdlib by that, though I'm not sure if there are any other considerations to make with homebrew.

@fwcd fwcd added the dependency resolution Related to the project dependency/standard library resolver label Feb 4, 2021
@themkat
Copy link
Collaborator

themkat commented Sep 25, 2022

This should be fixed by #383 , at least for Mac Homebrew. Unsure if the Linux version puts it inside the same type of folder structure...? (see PR for details).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency resolution Related to the project dependency/standard library resolver
Projects
None yet
Development

No branches or pull requests

3 participants