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
Publish scalameta parser diagnostics for Scala 3 #2807
Conversation
val isNotSbt = !uri.getPath.endsWith(".sbt") | ||
if (isNotSbt) | ||
CompilerInterfaces.parseErrors(driver, uri, params.text) | ||
else | ||
Nil.asJava |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked scala2 PC and this method has an empty implementation and does nothing.
I'm wondering why we use it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Scala 3 parser diagnostics seem to be nicer, but maybe we can just remove it altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed them, it should also fix some other issues
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Let's unify the parsing errors are presented to the user, the Scalameta parser is much better now and it should make it a bit faster. Also, this would cause issues in sbt files if the build was not imported and the fallback version set to Scala 3.0.0.
Previously, when the build was not imported and the fallback version set to Scala 3.0.0, we would get parsing errors in sbt files. Now, we added an explicit check to avoid it.
Fixes #2549