-
Notifications
You must be signed in to change notification settings - Fork 41
Fix exit code of rust-semverver in tests #93
Conversation
@ibabushkin with this change, I think we can start using The only blocker is that I don't know what the best way is to address that. |
Ok so this fixes things for older libc versions, but is not enough to use newer libc versions, because newer versions have a |
So the issue is that rust-semverver does not handle crates with multiple outputs at all. Thank you for leaving a When build scripts are involved, this is what happens, at least for So in my last commit I just hacked in the bare minimum logic to support this particular use case. I have no idea what other kinds of multiple outputs there are, and how to programatically find what we are interested in (just the final cc @ehuss - is there a way to extract from the build plan whether an output is a build script, a build program, an rlib, etc. ? If not, maybe adding a key to the json structure identifying these things might be worth doing. |
So I have a PR to libc that uses this PR of rust-semverver on CI to verify that no API-breaking changes are introduced: rust-lang/libc#1154 |
The building of a build script is noted as The execution of the build script is noted as I'm not terribly familiar with semverver, but I'm guessing you only want lib targets? In that case, you want to filter for IOW, you probably want to filter for |
Thank you @ehuss ! So I've updated the PR to check if the
@ehuss This is the json output I get, and I don't see We might be using a slightly older version of |
So I've updated the libc PR with the latest changes here, and everything still works. One thing we probably want to do in the near future is add support for validating APIs that depend on |
It was added about about 3 months ago in rust-lang/cargo#6331. |
@ehuss ah that explains it, we are still using @ehuss there is some discussion here that might interest you: rust-dev-tools/dev-tools-team#45 |
Sorry this took so long, merged! |
Awesome, thank you! If you could do a release, I'll update the libc PR and libc will start using this in CI (allowing it to fail for the time being, so that if this temporarily breaks libc's build still passes). |
On 2019-03-01, gnzlbg wrote:
Awesome, thank you! If you could do a release, I'll update the libc PR and libc will start using this in CI (allowing it to fail for the time being, so that if this temporarily breaks libc's build still passes).
--
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub:
#93 (comment)
Release (with some nighly fixes) is up.
|
So it turned out that the bug with rust-semverver returning an incorrect exit code on error (it always returned success) wasn't in rust-semverver, but in rustc itself. This is now fixed upstream (rust-lang/rust#58400), which makes all tests that should return an error exit code fail. This PR fixes that.