-
Notifications
You must be signed in to change notification settings - Fork 262
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
Fix: Support for Corretto tests #3733
Conversation
wr.Write("\"" + Dafny.ErrorReporter.TokenToString(tok).Replace( | ||
@"\", @"\\") + ": \" + "); |
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.
wr.Write("\"" + Dafny.ErrorReporter.TokenToString(tok).Replace( | |
@"\", @"\\") + ": \" + "); | |
wr.Write("\"" + TranslateEscapes(Dafny.ErrorReporter.TokenToString(tok)) + ": \" + "); |
The root cause is printing out a string without any escaping (nothing to do with Corretto AFAICT).
It looks like all compilers have the same issue in EmitHalt
, so worth applying the same fix consistently if possible.
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.
I did not use "TranslateEscapes" because it's not an escaping function. It's actually taking the source of a Dafny string and translating escapes to Java Escapes. Here, the only thing in PATHs that could be problematics is the backward slash.
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 my mistake, you want EmitStringLiteral(..., true, wr)
…/dafny into fix-3731-test-on-java
This PR fixes #3731, which will enable me to reproduce #3724 locally.
I did not add tests for now because this bug appears on Windows + Corretto machines, and I just switched to Corretto. I'm not expecting to change the CI pipeline until we decide so.
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.