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

Recover from invalid paths returned from Bloop diagnostics #3372

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Dec 16, 2024

Fixes #3370

This is sort of a band-aid, as we still might require a fix upstream in Bloop. (cc @tgodzik)
It seems we're getting an invalid path in a diagnostic coming from Bloop.
Refer to

val path = os.Path(Paths.get(new URI(params.getTextDocument.getUri)).toAbsolutePath)

I just make sure we recover from it in the CLI.

@Gedochao Gedochao force-pushed the maintenance/recover-from-invalid-paths-from-bloop-diagnostic branch from ca725c3 to fa98948 Compare December 16, 2024 13:41
@Gedochao Gedochao marked this pull request as ready for review December 16, 2024 13:41
@Gedochao Gedochao force-pushed the maintenance/recover-from-invalid-paths-from-bloop-diagnostic branch from fa98948 to 82fdad2 Compare December 16, 2024 14:46
Copy link
Member

@tgodzik tgodzik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but any idea how the invalid path is generated? :O

@tgodzik
Copy link
Member

tgodzik commented Dec 16, 2024

Actually, wouldn't the main error lie in the compiler itself? Bloop just forwards what it gets, it doesn't change paths

@Gedochao
Copy link
Contributor Author

Gedochao commented Dec 16, 2024

Actually, wouldn't the main error lie in the compiler itself? Bloop just forwards what it gets, it doesn't change paths

@tgodzik I'd say it would if it wasn't for the fact that the problem doesn't occur with --server=false 😉

Looks good, but any idea how the invalid path is generated? :O

No idea whatsoever. Would have to debug in Bloop, probably.

@tgodzik
Copy link
Member

tgodzik commented Dec 16, 2024

But the invalid path is generated in the compiler. It's just not validated since we use rendered message.

@Gedochao Gedochao merged commit 3398b25 into VirtusLab:main Dec 16, 2024
50 checks passed
@Gedochao Gedochao deleted the maintenance/recover-from-invalid-paths-from-bloop-diagnostic branch December 16, 2024 16:09
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.

Crash when compiler emits a warning due to analyzing a dependency
2 participants