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

CodeAction is not forwarded #1225

Closed
eed3si9n opened this issue Jul 22, 2023 · 2 comments · Fixed by #1226
Closed

CodeAction is not forwarded #1225

eed3si9n opened this issue Jul 22, 2023 · 2 comments · Fixed by #1226

Comments

@eed3si9n
Copy link
Member

eed3si9n commented Jul 22, 2023

Originally posted by @lrytz in #1214 (reply in thread)

I managed to track it down it down:

@eed3si9n it seems we need to add the actions parameter to xsbti.AnalysisCallback.problem. Can we do that with a new overload in a binary compatbile manner?

@eed3si9n
Copy link
Member Author

eed3si9n commented Jul 22, 2023

So I guess @adpi2 introduced resending mechanism via Analysis in sbt/sbt#5956 because compilation that got skipped over by Zinc may still contain useful compiler warnings that we need to retain or resend? I wonder if we should reevaluate if that's still needed since we used to send all of the diagnoses back then, but now we only send the changes?

@eed3si9n
Copy link
Member Author

Re: AnalysisCallback, I guess we can't just add a method because it's on the receiving end of a method call.

Scala 3.3.0 Scala 3.3.next Scala 2.13.11 Scala 2.13.next
Zinc 1.9.2 do not send actions do not send actions
Zinc 1.9.next ⚠️ send action, maybe send actions, maybe

If we added an overload, then 3.3.0 won't use it because it's already released a binary compiler bridge, Scala 2.x can use it because the source-distributed compiler bridge can immediately use the method; however, Scala 3.3.next and 2.13.next also cannot use it because it needs to be compatible with current Zinc 1.9.2.

This means that we need a mechanism to check if the current Zinc supports new CodeAction and only then send them.

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 a pull request may close this issue.

1 participant