-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
compiletest: warn if we see a // @<directive-name>
#125813
Comments
Gonna take a look at it. |
This should obviously skip |
It might be worth waiting on some directive handling reworks (not concrete design and plan just yet unfortunately) I've been wanting to do |
Huh, many thanks for the heads up, I was not aware that we had these kind of directives lol |
That seems confusing? Could that be changed? |
yes, just need someone to do it (I can if you want?). |
Yes, it can. Coincidentally, I've started rewriting The easiest solution would be to just register HtmlDocCk & JsonDockCk directives in |
I think that is a symptom of a more general problem: historically compiletest directives used |
I will definitely assign myself to the HtmlDocCk side of things given I've been working on it off and on for 3 weeks lol |
An alternative solution is for test-suite-specific directives to also use the new compiletest directive start I think this is probably more preferrable, because e.g. it allows filecheck directives to become |
The cleanest solution (long-term) would be to allow subtools to "register hooks" |
that would also be an option, I don't know if I like it visually lol |
Yeah, I'm not saying it's the most visually appealing thing ever :3 Having test suites being able to register suite-specific directives via hooks would be very cool, maybe |
I completely forgot you were working on it even though we talked about it recently. >< Then I'll let you handle the html test side. |
Btw, I don't think we should block "warn if we see a I'm fine with blocking this enhancement on "some directive handling reworks […] [jieyouxu has] been wanting to do" (#125813 (comment)). Namely #123765 I presume. |
To be fair, I don't want to block this on that either -- it's okay if someone wanted to improve this, the refactoring can account for this warning too. |
The progress on that is I'm trying to have a couple reading passes over compiletest to better understand what we currently do and then try to come up with how we can handle directives in a more robust way. |
the filecheck directives are processed by the filecheck tool itself, for the majority of cases compiletest gives no special instruction here. |
Ah good point, probably better to leave as-is then |
as stated in #125825:
|
…-syntax, r=fmease,oli-obk Migrate rustdoc tests syntax to `//@` (for coherency) Part of rust-lang#125813. cc `@jieyouxu` r? `@fmease`
…-syntax, r=<try> Migrate rustdoc tests syntax to `//@` (for coherency) Part of rust-lang#125813. cc `@jieyouxu` r? `@fmease` try-job: aarch64-apple
…-syntax, r=<try> Migrate rustdoc tests syntax to `//@` (for coherency) Part of rust-lang#125813. cc `@jieyouxu` r? `@fmease` try-job: aarch64-apple
…-syntax, r=fmease,oli-obk Migrate rustdoc tests syntax to `//@` (for coherency) Part of rust-lang#125813. cc `@jieyouxu` r? `@fmease` try-job: aarch64-apple
…, r=GuillaumeGomez Update jsondocck directives to follow ui_test-style Context: Comment chain in rust-lang#125813. Follow-up to rust-lang#126788. Use the same temporary approach of "double parsing" until we figure out how we want to support compiletest/ui_test directive "add-ons" for child test runners like HtmlDocCk and JsonDocCk. I didn't touch much of jsondocck because I want to refactor it some other time (for robustness, maintainability and better diagnostics; basically by following a similar design of my WIP HtmlDocCk-next, cc rust-lang#125780). r? `@GuillaumeGomez`
Realized in #125808 (comment).
A test writer might accidentally write
// @ignore-cross-compile
which is parsed as a normal comment not a compiletest directive because compiletest directives require that the line starts with
//@
.This typo is hard to spot: both by PR authors and the reviewers. It might not fail in PR CI -- it might not even fail in full build CI, but then explode when the conditions are just right.
We should detect these and issue at least warnings from compiletest to help test writers realize the problem.
The text was updated successfully, but these errors were encountered: