-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Test chars safely when highlighting #22918
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
base: main
Are you sure you want to change the base?
Conversation
1f80504
to
f553e23
Compare
It would be nice if the nuisance message did not make its way into the check file. The test rig could de-duplicate. Again, the goal is that I don't have to change my scala-cli reproduction just to use it as a test.
|
f553e23
to
1898a5e
Compare
@@ -0,0 +1,5 @@ | |||
//> using scala 3.7.0-RC1 | |||
//> using options -rewrite -indent |
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.
This is nominally a no-op without -source 3.0-migration
but would throw; it requires the other options to demonstrate the behavior.
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.
updated to document my comment that vulpix doesn't demonstrate the error.
1898a5e
to
0eb77ce
Compare
0eb77ce
to
b42e82d
Compare
b42e82d
to
d80887d
Compare
The arrow test at lastOffset - 3 is out-of-range when highlighting, which parses a snippet of source. Always check lower bound in testChar. Don't check as initial condition in testChars because it recurses.
d80887d
to
3defb6e
Compare
Squashed. Some tests such as |
The arrow test at lastOffset - 3 is out-of-range when highlighting, which parses a snippet of source.
Fixes #22906
Reproduces under scala-cli
-rewrite -indent
but not under vulpix. (It would be nice to know why.) (Needless to add, it shouldn't be a research project to get the test rig to just run a compilation. There is programmatic flag-setting that defies expectations.)This commit also allows a test to
using scala
by ignoring it, as a convenience. When the directive parsing is completely aligned with scala-cli, it should completely ignore what is not supported, so that test files can be used both ways.