-
Notifications
You must be signed in to change notification settings - Fork 3.1k
x op ()
now parses as x.op(())
not x.op()
#7684
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
Conversation
When parsing infix expression, a Parens node is created for parens. If it is empty, they wrote unit value. Otherwise, per the spec, the possibly many comma-separated arguments are taken as arguments. `() == ()` is now what it looks like. `x op()` is corrected to `x.op()`.
f79e8b6
to
b0192f7
Compare
before:
after:
because it's being taken as if I'd written:
this doesn't seem to match what you wrote above, namely " |
discovered because it broke ScalaTest in the 2.13 community build. I had to: - outputStream getChannel() transferFrom(Channels.newChannel(inputStream), 0, Long.MaxValue)
+ outputStream.getChannel().transferFrom(Channels.newChannel(inputStream), 0, Long.MaxValue) not sure how widespread breakage is. |
@SethTisue sorry, what I meant was, "I corrected the spots in the compiler where they wrote I noticed it here: #6974 (comment) I think the bad syntax hearkens back to the loose days when folks decided that dots were optional everywhere, the way they once started saying that braces and parens are interchangeable. Edit: also that parens are optional everywhere, like clothing. What decadent times! |
@SethTisue I rediscovered how to look at the community build runs; it's a bit hard to just find the first error; if I see that something isn't building, is the protocol to PR upstream or do something so the CB project can try it out? Edit: I see that there are local projects I could PR to. |
@som-snytt it's okay, I'm on it, usually it's easiest for me to just do the needed tweaks myself. for others to try to navigate community build stuff is usually an unnecessary time sink for them. in cases where I need help, I'll ask for it :-) in this case I dealt with ScalaTest via scalacommunitybuild/scalatest@81302db , I'm currently seeing how much other breakage there is, but I have several other 2.13.x breakages (unrelated to this PR) I also need to address at the same time... I'll come back here once the dust has settled somewhat. |
I won't bug you about it now. I thought I was running a local build just for utest, but I guess it's doing the full suite. I had exercised dbuild once before and fixed something somewhere, so I know it's possible. Probably I was in better shape back then. |
it extracts dependencies for everything even if you are only actually building a subset, could be what you're seeing. and for the first run, extract dependencies from 180 repositories takes a looooong time (after that the results are cached, unless you change the Scala SHA or something else fundamental). usual workaround if you are working on something at least somewhat near the root (like utest or cats) is to delete everything in community.dbuild below the project you care about. (I do my best to keep the file ordered in such a way that this works.) |
so far it's looking like breakage is not that common 👍 |
Incorporates the code changes in scala/scala#7684
@som-snytt would you mind updating the PR description to include a bit of motivation, aimed at end users who are seeing the change and wondering what the story is? (example: scala/bug#11475) |
@SethTisue maybe also promote the message improvement to RC2 scala/bug#11461 |
@som-snytt new description is better, thanks. re 11461, I think a fix would be accepted for RC2, but I'd prefer not to put any non-blocker bugs on the milestone |
x op ()
now parses as x.op(())
not x.op()
I've improved the title as well. (in dem Release-Notes auch) |
Previously,
x op()
was incorrectly taken asx.op()
.Now it is correctly parsed as
x.op(())
, where unit value is an operand in the expressionx op ()
.Previously,
() == ()
would warn about adapting().==()
to().==(())
.When parsing infix expression, a Parens node
is created for parens. If it is empty, they
wrote unit value. Otherwise, per the spec,
the several comma-separated arguments
are taken as arguments. (A single operand
in parens is just a single argument, as usual.)
Split from the rebasing hamster wheel at #6974