-
Notifications
You must be signed in to change notification settings - Fork 742
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
Multiple test failures in tracing-futures 0.2.3 #632
Comments
Thanks for the reports, this is very helpful --- I'd definitely like all our tests to work even in edge cases, so we'll try to fix these!
I'm guessing that your vendorization process involves building crates outside of the upstream repo? This failure is due to using a Some options for fixing this:
It looks like the issue here is that the |
Oh, I see what's the matter! CI only runs tracing/.github/workflows/CI.yml Line 86 in 12fde2d
This means that we only check if the main crate code compiles with those feature combinations. All these issues are only when compiling tests, and CI isn't currently checking that tests compile across feature combinations. We should fix this. |
Currently, when checking feature combinations on CI, we only check that the _main_ crate code compiles. This means that the CI build will not fail if tests don't compile with a given feature combination. This is why issue #632 wasn't caught earlier; see [here][1] for details. This commit changes the `cargo check` command to `cargo check --tests --benches`. [1]: #632 (comment) Signed-off-by: Eliza Weisman <[email protected]>
Indeed. We prefer to use "published sources" as they're predictable and immutable, and more mirror friendly, and given the "published sources" are what everyone actually uses, it makes more sense to test the published content works as expected ( which can in some cases vary from upstreams repo at the time of publish ). Just unfortunately, rust ecosystem norms don't tend to prioritize the ability to test this scenario (which weakens the ability to verify the published sources are reliable). So anything that improves this norm is welcome :) |
#633 should fix the issue with feature flags. We'll try to find a better solution for sharing the test-support code, but that may take a little time, especially since it's going to take some effort to clean that up so it can be a published API rather than internal. Thanks again for bringing this up! |
Given #633 (comment), should (could?) we publish an unstable, use-at-your own risk version of tracing-test? If we need to make a breaking change to |
Hi, I'm working on a Linux Vendorization project working with rust crates, and as part of the QA of the vendorization process, we run tests (and the more tests we can run, the better).
However, I've been hitting a few failure that's non-trivial to patch out downstream, and can only be seen once other failures have been patched, so I've opted to put this all in one bug for now.
Some of my test scenarios may seem weird to you, so I don't want to pester if they're intrinsically unsupported situations, (though documentation of this could be a fix, or compile-time assertion-failures when the combination is used).
cargo test
fails due to nosupport/mod.rs
Applying the most obvious workaround for that with this hackish patch:
Disable broken tests without --cfg broken_tests
Is enough to make a rudimentary test pass.
But a residual problem occurs with:
cargo test --all-features
Which to me, suggests some combination of features is unsupported, and warrants a compile time assertion to refuse this ( as its possible to accidentally have 2 different dependencies with 2 different 'features=[ ]' specifications, which cargo will unify and give spooky action at a distance ).
It appears the broken combination is:
cargo test --no-default-features --features "futures-01 tokio"
The text was updated successfully, but these errors were encountered: