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
CI: replace compiletest-rs with trybuild #268
Conversation
We use compiletest to run compile-fail tests but compiletest depends on compiler internals so it breaks every now and then and requires nightly. With trybuild we can also run compile-fail tests but it works on stable and it already has reached version 1.0
warning: unused import: `rtfm::app` | ||
--> $DIR/task-priority-too-high.rs:3:5 | ||
| | ||
3 | use rtfm::app; |
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.
Uh, spurious warning? Is this a known rustc bug?
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.
The warning it's also present on 1.36.0. Perhaps this has been there for a while but compiletest ignores warnings by default?
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.
Yeah, that's probably what's happening
ci/script.sh
Outdated
# compile-fail tests | ||
cargo test --test single --target $T | ||
# compile-fail tests | ||
cargo test --test single --target $T |
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.
The compiler output might change between versions, so running this on all channels might cause issues later on
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.
good point. I have changed the condition to test only when rustc --version == $MSRV
. $MSRV remains constant for a whole major version of rtfm (e.g. 1.36.0 for v0.5.x)
in the same vein as rtic-rs/rtic#268
this version is more or less fixed so new releases of Rust (stable or nightly channel) are unlikely to break to build due to changes in diagnostic messages
269: [v0.4.x] CI: pin to an older nightly r=korken89 a=japaric to workaround compiletest-rs being broken on recent nightlies this is a backport of #267 and it's required to land #265 I'm not backporting #268 (compiletest -> trybuild) because this branch has compile-pass tests which depend on compiletest and can't be ported to trybuild Co-authored-by: Jorge Aparicio <jorge@japaric.io>
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.
Nice, seems like we can get away from compiletest-rs thanks for doing the push!
bors r+ |
268: CI: replace compiletest-rs with trybuild r=japaric a=japaric We use compiletest to run compile-fail tests but compiletest depends on compiler internals so it breaks every now and then and requires nightly. With trybuild we can also run compile-fail tests but it works on stable and it already has reached version 1.0 270: Added struct de-structure-ing example in tips & tricks r=japaric a=korken89 As per last meeting, a bare-bones added that we can improve Co-authored-by: Jorge Aparicio <jorge@japaric.io> Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Build succeeded |
269: [v0.4.x] CI: pin to an older nightly r=korken89 a=japaric to workaround compiletest-rs being broken on recent nightlies this is a backport of #267 and it's required to land #265 I'm not backporting #268 (compiletest -> trybuild) because this branch has compile-pass tests which depend on compiletest and can't be ported to trybuild Co-authored-by: Jorge Aparicio <jorge@japaric.io>
19: CI: replace compiletest with trybuild r=perlindgren a=japaric in the same vein as rtic-rs/rtic#268 Co-authored-by: Jorge Aparicio <jorge@japaric.io>
19: CI: replace compiletest with trybuild r=perlindgren a=japaric in the same vein as rtic-rs/rtic#268 Co-authored-by: Jorge Aparicio <jorge@japaric.io>
We use compiletest to run compile-fail tests but compiletest depends on compiler
internals so it breaks every now and then and requires nightly. With trybuild we
can also run compile-fail tests but it works on stable and it already has
reached version 1.0