-
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
Upgrade f-interpolator #13367
Upgrade f-interpolator #13367
Conversation
c2eb496
to
91ca4f9
Compare
@dos65 @som-snytt any news on this one? |
It's not pretty but is mergeable. Future improvements would include optimizing and constant folding. I can give it my eyes one more time this week. |
So you're still planning to do some work on it? Or can @dos65 review it? |
I'll give it a quick pre-review and click ready for review. (Edit: removed observation that any LOC is burdensome.) |
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.
@som-snytt Nice work! Glad to see that the parity with Scala2 is finally obtained.
I left some comments/suggestions
compiler/src/dotty/tools/dotc/transform/localopt/StringContextChecker.scala
Outdated
Show resolved
Hide resolved
compiler/src/dotty/tools/dotc/transform/localopt/StringInterpolatorOpt.scala
Show resolved
Hide resolved
compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala
Outdated
Show resolved
Hide resolved
compiler/src/dotty/tools/dotc/transform/localopt/FormatChecker.scala
Outdated
Show resolved
Hide resolved
Sorry I was busy this past week, I meant to update this over the weekend! Still plan to look at this next time I touch the keyboard. Thanks for giving it eyes! |
91ca4f9
to
1392f66
Compare
I guess the best part is 850 lines added, 851 lines removed. Edit: the other best part was figuring out again how to run a test. |
@dos65 @som-snytt what's the status on this one? Is the PR review-ready in which case WDYT about it @dos65 ? |
@anatoliykmetyuk I think it's almost ready to merge. The only thing I'm worried that the @som-snytt Don't you mind if I'll try to address this thing and will do a PR onto your branch? I think I will have time for that on this week. |
My previous comment on use of
I didn't follow up on ensuring
|
What do you mean by backport to Scala2? Do you want to port it back? I thought that this PR is a port from Scala2 🤔
I've checked this sample, it's constant. Is there anything else to check? I think there is a need to ask someone from core compiler team for a final review as it's a large PR. |
yes, I intended to backport the forwardport. 😄 I won't stand in the way of whatever you'd like to improve, for some definition of improve. Mostly I feel that the compiler should not ingest all this code that ought to be library code, but the first step is just correctness. There is no binary compat constraint so it can be fixed/improved at any time. |
While I think of it, |
Embraced @dos65 's suggestions and dropped some code. Although I embraced the suggestions, I dropped some braces. I remember how nice it was to have the braces removed from my teeth in middle school. |
ab6f29a
to
9b66cef
Compare
Improved test output to show where |
@som-snytt please let us know once this is review ready :) |
Definitely ready. I could definitely make improvements indefinitely. |
Tweak vulpix to show difference in expectations.
Prefer a regex for collecting magic error comments. Allow arbitrary space after line comment but warn that no space `//error` disables that error, which is useful for testing and development.
Rebased on phase name conflict. Tweaked the f-usages that required backslashes to obviate returning to it later. An unbootstrapped compiler will show doubled backslash in a few messages:
"Caveat backslasher." |
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.
LGTM🎉
Thanks @som-snytt for all the work, and @dos65 for reviewing it!
Non-bootstrapped tests are failing. See logs. |
Could reproduce locally (
The problem seems to be the duplicated slash in |
See my last comment. I wasn't sure about the protocol. On Scala 2, the change would wait until "restarr". Should I submit a revert for that commit? FSR, it wasn't clear to me that tests were run unbootstrapped. |
Fixes #9939
Fixes #11256
Fixes #11750
Fixes #13293