Skip to content

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

@daphil19

Description

@daphil19

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependency resolutionRelated to the project dependency/standard library resolver

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions