-
Notifications
You must be signed in to change notification settings - Fork 337
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
chore: Update Scalameta to 4.8.11 #5681
Conversation
d3818e0
to
fbf2412
Compare
The changes in this pr inline some of the internal code from scalameta which is prone to change. This changed over the last few versions so if we try to compile older version of scala with an older version of scalameta this would break otherwise. |
@@ -688,7 +688,6 @@ class ScalaToplevelMtags( | |||
case WHITESPACE => | |||
nextIsNL() | |||
case COMMENT => | |||
scanner.skipComment() |
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 this change?
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.
The method got removed and it's not necessary since getting the next token will also skip any comments
@@ -133,13 +133,13 @@ class JavaToplevelMtags(val input: Input.VirtualFile) extends MtagsIndexer { | |||
parseToken | |||
case _ => | |||
val token = kwOrIdent( | |||
reader.charOffset - 1, | |||
new StringBuilder().append(first).append(next) | |||
reader.endCharOffset, |
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 did this offset change?
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.
It was split into start and end in scalameta/scalameta#3339
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.
Yeah, but why did the -1
disappeared?
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.
Actually, I think I removed it since the tests didn't pass, but maybe it should be just begCharOffset
instead.
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.
Seems like begCharOffset
works and that should be an equivalent of -1 before. Not sure why it worked with end offset, though I imagine our tests mostly use the end
0db68bc
to
1c140f6
Compare
This is an internal part of scalameta, which is not kept binary compatible, so it's safer to inline it.
No description provided.