Skip to content
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

Merged
merged 3 commits into from Nov 13, 2019
Merged

CI: replace compiletest-rs with trybuild #268

merged 3 commits into from Nov 13, 2019

Conversation

japaric
Copy link
Collaborator

@japaric japaric commented Nov 7, 2019

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

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;
Copy link
Contributor

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?

Copy link
Collaborator Author

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?

Copy link
Contributor

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
Copy link
Contributor

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

Copy link
Collaborator Author

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)

japaric added a commit to rtic-rs/rtic-syntax that referenced this pull request Nov 7, 2019
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
bors bot added a commit that referenced this pull request Nov 7, 2019
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>
Copy link
Collaborator

@korken89 korken89 left a 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!

@japaric
Copy link
Collaborator Author

japaric commented Nov 13, 2019

bors r+

bors bot added a commit that referenced this pull request Nov 13, 2019
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>
@bors
Copy link
Contributor

bors bot commented Nov 13, 2019

Build succeeded

@bors bors bot merged commit e9a8394 into master Nov 13, 2019
@bors bors bot deleted the trybuild branch November 13, 2019 20:16
bors bot added a commit that referenced this pull request Nov 13, 2019
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>
bors bot added a commit to rtic-rs/rtic-syntax that referenced this pull request Nov 14, 2019
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>
bors bot added a commit to rtic-rs/rtic-syntax that referenced this pull request Nov 14, 2019
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants