-
Notifications
You must be signed in to change notification settings - Fork 123
Add support for compiler tests #90
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
Conversation
@@ -17,9 +17,14 @@ categories = [ "no-std", "rust-patterns" ] | |||
version = "0.4" | |||
optional = true | |||
|
|||
[dependencies.compiletest_rs] |
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.
Could this be a dev-dependency
instead?
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'm afraid it can't at the moment - rust-lang/cargo#1596 and it needs to be optional, because, due to language features, it simply doesn't build on stable/beta
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.
Really
1ca6c71
to
60e11d8
Compare
@fuine Sure. I've got a Windows box handy so will do some troubleshooting over the weekend. |
Cool, thanks. Just heads up: compile tests work on my machine using both Windows and Linux, they also work on travis, it's just that for some reason appveyor build refuses to find |
So this is actually failing on my local environment too. Which is probably good news |
That's great news, however could you test it as well on 60e11d8 ? |
Yep, specifying the target directly when running the compile tests seems to cause it to fail to find the |
I don't have any indepth knowledge of appveyor's config, but if you don't specify target doesn't it fallback on w/e target it has set as default/finds first? Also if this is really a proble with |
Actually at this point I'm willing to test that and just manually see the logs to check which targets are used if we don't specify them explicitly. |
I think you're right, and since you're setting the default appropriately this should be fine. My guess is that this is a problem with the rustflags we're giving |
Thanks for the help, I've squashed previous commits and added some notes on the tests. I think it's potentially mergeable once CI goes green, but I can also squash the last commit with the first one - I want to preserve 6529b07 because it explicitly fixes a regression that I introduced in my previous PR. |
That history looks good to me 👍 I'm happy to merge this in once it's all green. Thanks for doing this @fuine! Your efforts to improve a bunch of aspects of the library are really appreciated! 😃 |
This is an initial version of compiler tests. So far it should work on travis, appveyor is a bit harder to achieve, because there's no simple way to add testing with specified features only on nightly. Please don't merge yet, because I want to at least try to make them run on appveyor as well.
Moreover due to the design of
compiletest
crate and its implementation details there isn't any clear way to annotate warnings/errors in lines that are being expanded by the macro, but rather we are forced to useerror-pattern
general mechanism. I will document that in code later on, just wanted to highlight it here.