-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Restore Scanner.commentSpans
#18224
Restore Scanner.commentSpans
#18224
Conversation
We need to setup MiMa on this project. |
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.
dotty.tools.dotc.parsing.Scanners
isn't public API, so we shouldn't take on supporting it's external usage
Right, this is not a stable API |
@@ -233,6 +233,10 @@ object Scanners { | |||
/** Return a list of all the comments */ | |||
def comments: List[Comment] = commentBuf.toList | |||
|
|||
/** Return a list of all the comment positions */ | |||
@deprecated("Use `comments` to get rich information source comments", since = "3.3.2") |
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.
Why not mark it as @InternalApi
as Akka?
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.
They can use comments.map(_.span)
.
As this project depends on the compiler itself, it must be recompiled for each version of the compiler (including patch versions). They might need to adapt their code for each release. I'm unsure if this project should be on the open community build. Most of the failures will be on the side of scala-repl-pp. The best setup is probably for them to test each day against our nightlies to discover new incompatibilities. |
Agreed, it sounds like it's not a good candidate for our use in the community build. |
There is nothing bad in removing that in Scala Next (so on the current main), but I'm strongly against removing any API in LTS; even if we are not providing any guarantees for such API. I'll merge this to 3.3.1. EDIT: I just realized that the API was removed AFTER the 3.3.1 cut-off, so it is okay for now. |
…y in 3.3.x minor
206b1b2
to
0d295b9
Compare
Restores
Scanner.commentSpans
method removed in #17528 to preserve the source compatibility of the public compiler API.The restored method is now marked as deprecated, allowing to remove it in some future, non-lts, major release.
The public API was used in mpollmeier/scala-repl-pp and regression was discvered in Open CB: https://github.com/VirtusLab/community-build3/actions/runs/5557868276/jobs/10155544164