-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Buildbot grammar #37825
Buildbot grammar #37825
Conversation
(rust_highfive has picked a reviewer for you, use r? to override) |
Dose it checks the commit messages too? |
I am sorry, I do not understand which checks do you mean? |
0651a00
to
98770aa
Compare
So thinking a bit about this bot, I wonder if we can perhaps try to speed up its execution time? We could take strategies like:
Thoughts? |
Good news: it works 😄 For the speedup, I think using the system llvm would be perfect. I am not sure about not building the compiler because if I had broken something inside the compiler, how would I know when the compiler used for the checkes is still a good one? Should I disable the Running the grammar checks on every commit of every PR might be overkill. If I understand it correctly the script runs all tests as soon as bors is attempting to merge everything on the auto branch, yes? Before we merge this, I guess I should switch back the |
Oh installing llvm-3.9 is fine actually, should even get us a bit more coverage. But yeah before merging we'd want to turn The |
Hm so this line seems suspicious:
Does that mean that we're actually differing on a bunch of files? Does this mean that the verification doesn't generate an error if a difference is detected? |
I might be missing the joke, but it should be spelled "grammar", not "grammer" in the PR title. |
I think the reason is bash: if [ -z "42" ] ; then true; else false; fi this returns if [ -z "42" ] ; then true; elif [ -z "42" ]; then false else false; fi does not |
I found the bug in the shell script: if [ -z "42" ] ; then echo 1; false; elif [ -z "42" ]; then echo 2; false fi; else echo 3; false; fi
^^^ this Fun fact, with this code there is no path to echo if [ -z "42" ] ; then echo 1; false; elif [ -z "42" ]; then echo 2; false else echo 2.5; false fi; else echo 3; false; fi Do you have an idea how to solve this problem? |
Ah I was wondering what was wrong with that! Nice find :) Wanna switch back the |
b578a8d
to
cc35c89
Compare
Allright I rebased to current master. I reverted my changes to the With this rebase we are at 625 failing grammar tests. Unforunalty the That said I expect this PR to fail on the |
Hm I'd prefer to not check in a matrix entry which fails tests. Could we set |
with open(filename, "w") as f: | ||
for p in bad[parser]: | ||
print("bad test: {}".format(p)) |
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 added this output because the output file will be lost with the container.
This works for me, but I may take some time and I would appreciate help with fixing the tests. I guess in theory interestes people could also send me PRs with fixied tests directly and I could merge them into this PR. |
Oh yeah sure, we can definitely help out. Want to set |
26b222f
to
a198afb
Compare
Cool 👍 |
91e62b3
to
ee785b9
Compare
I looked into some of the errors and it looks like some of them are the parser not understanding the new error format. I tried to fix one, but I guess somebody with knowledge of bison could help. |
Hm this does raise an interesting question. If we enable and start gating on this then we're requiring that all changes and extensions to the grammar are implemented as well (or ignored). If we require changes, then this is essentially starting out RFC 1331. I'd just want to make sure that we're all on board with that and consciously making that step.. cc @rust-lang/compiler, this may make it slightly more difficult to extend the grammar in the future (the actual grammar has to be updated), but that seems like it may be a good thing. If that's true, is the current implementation of |
ee785b9
to
aa76e62
Compare
☔ The latest upstream changes (presumably #37817) made this pull request unmergeable. Please resolve the merge conflicts. |
aa76e62
to
2685c66
Compare
The Is there a replacement yet? |
The old infrastructure still exists temporarily with |
- Made with ubuntu 16.10 and python3 - Include antlr-complete.jar - Switch to system llvm 3.9
2685c66
to
819ab04
Compare
You may want to update Dockerfile as in #38632. |
☔ The latest upstream changes (presumably #38748) made this pull request unmergeable. Please resolve the merge conflicts. |
Closing due to inactivity, but feel free to resubmit with a rebase! |
This is the implementation of #28592.