Replies: 5 comments 33 replies
-
Scala |
Beta Was this translation helpful? Give feedback.
-
I haven't figured out the exact details yet, but there's the code that does unzipping of the source-jar and invokes on-the-fly compilation of the compiler bridge. My thinking is basically add a line somewhere after unzipping to rewrite the reporter source file if Scala version matches some range. |
Beta Was this translation helpful? Give feedback.
-
Here's my PR part 1 for this - #1215 |
Beta Was this translation helpful? Give feedback.
-
Thank you @eed3si9n! So IIUC, this would create a "bridge" artifact to be released with zinc, and build tools should pick that up if the compiler is 2.13.12+, right? Since that it requires changes in build tools, maybe it's the right moment to re-consder moving the bridge to the compiler. There's no obvious reason why scala/scala#8531 didn't make it. I believe there was just no good reason to change the running system. But now we are at this point anyway. |
Beta Was this translation helpful? Give feedback.
-
I worked on moving the bridge sources to scala/scala and it's looking good, the binary bridge is working. Branch: https://github.com/scala/scala/compare/2.13.x...lrytz:scala:sbt-bridge-2023?expand=1. Running There's another advantage to that approach (vs continuing with the bridge distributed as source code with zinc) that I didn't realize before: users can get quickfixes working with existing versions of sbt by using
See the @ckipp01 to test it in VS Code, would I need some nightly version? Or make sure to not use bloop but sbt's bsp server? |
Beta Was this translation helpful? Give feedback.
-
The
Reporter
in Scala 2.13.12 will have a newdoReport
method withactions: List[CodeAction]
that should be handled by the compiler bridge.The change is small in principle thanks to earlier work by @eed3si9n: https://github.com/sbt/zinc/compare/develop...lrytz:zinc:codeActions?expand=1
The difficulty is how to distribute it. suggestions by @eed3si9n (scala/scala#10406 (comment))
Requires adjustments in the build tools, which handle bridge compilation
https://github.com/sbt/sbt/blob/4b0b929838c7525cbacd790c2111997d80a5c72e/zinc-lm-integration/src/main/scala/sbt/internal/inc/ZincLmUtil.scala#L85-L100
Not sure how this would be handled - where would the file go? How would it be pulled in, would this require changes in the build tool?
Seems not possible, we need to override a different method. The new source code doesn't compile against old compilers.
Beta Was this translation helpful? Give feedback.
All reactions