Skip to content
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

Compute the SemanticDB target root correctly #71

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

jadenPete
Copy link

In Bazel, File#short_path is prefixed with .. if the file belongs to an external repository. However, this isn't meant to be interpreted as a relative path, as external repositories' outputs are in the external output directory.

This meant that when semanticdb_bundle was enabled and external repositories contained Scala rules, they'd fail to build, since the -P:semanticdb:sourceroot or -semanticdb-target compiler options would be computed incorrectly.

In Bazel, `File#short_path` is prefixed with `..` if the file belongs to
an external repository. However, this isn't meant to be interpreted as a
relative path, as external repositories' outputs are in the `external`
output directory.

This meant that when `semanticdb_bundle` was enabled and external
repositories contained Scala rules, they'd fail to build, since the
`-P:semanticdb:sourceroot` or `-semanticdb-target` compiler options
would be computed incorrectly.
@jadenPete jadenPete requested a review from jjudd November 19, 2024 01:03
@jadenPete jadenPete self-assigned this Nov 19, 2024
@jadenPete
Copy link
Author

By the way, I verified this works with path mapping.

@jadenPete jadenPete merged commit 8324f8b into lucid-master Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants