-
Notifications
You must be signed in to change notification settings - Fork 13.3k
compiletest directives docs for "ignore-" are incorrect or confusing #139516
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
Comments
It's technically correct in that I believe those would work if they're included in the directives allow list (lol). |
If every new target has to be added to some allow list, that will never be up-to-date. compiletest should accept all targets supported by rustc then. |
The intention in the long term is to not have to rely on any allow list, it obviously doesn't scale |
Also, I assume then this is similar for architectures etc? Would be good to document that so that one knows what to do when an architecture is not recognized. |
compiletest already queries rustc for various things, right? Can't it query the target list? |
There's two parts to this:
|
Yes, it's the same for archs. The valid archs are already computed based on all the builtion-targets combined + some extra archs rust/src/tools/compiletest/src/header/cfg.rs Lines 133 to 137 in c6c1796
|
I'll send a PR to document the current impl limitation in rustc-dev-guide. If you still need those
|
Why can't they be added to the allowlist automatically? We should be rejecting unknown directives, that is not a bandaid. But targets on the builtin target list are not "unknown".
|
Because I haven't gotten around to fixing that bit yet :) Really, if none of the directive parsers matched a directive-like line then it should just fail (but it doesn't do that yet). |
Fair. :) That sounds like the proper fix though. Ideally directive parsing is just a fallible operation and we error when all directive parsers fail; there should be no need for a separate allowlist, right?
EDIT: I didn't see your edit. So yeah fully agreed :)
|
Exactly. The separate allowlist is an artifact leftover from when I was migrating compiletest directives from |
https://rustc-dev-guide.rust-lang.org/tests/directives.html states that I can write
ignore-x
wherex
is "A full target triple: aarch64-apple-ios". However, that's not correct -- some target triples work, but not all of them. I realized this when my PR failed becauseignore-i686-pc-windows-gnullvm
dies not work, and neither does//@ ignore-i686-unknown-uefi
.CC @jieyouxu
The text was updated successfully, but these errors were encountered: