Remove test-defaults from default features to fix cargo install#17908
Closed
jeffs wants to merge 1 commit intoastral-sh:mainfrom
Closed
Remove test-defaults from default features to fix cargo install#17908jeffs wants to merge 1 commit intoastral-sh:mainfrom
test-defaults from default features to fix cargo install#17908jeffs wants to merge 1 commit intoastral-sh:mainfrom
Conversation
The `test-defaults` feature propagates features to `uv-test`, a dev-dependency. Since `cargo install` strips dev-dependencies, this caused installation to fail with "does not have a dependency named uv-test". Move the feature to an explicit opt-in in CI instead.
Author
|
CI hit a 502 downloading Python. |
Member
|
Hm, sorry I broke this — I did not foresee that. I think we need it in the default feature set for local development to be palatable though. |
Member
|
I added a workaround in #17954 |
zanieb
pushed a commit
that referenced
this pull request
Feb 10, 2026
The uv crate has uv-test as dev-dependency. We want that by default, uv runs tests with `uv-test/git`, so it's a default feature in uv. The problem is that uv-test is only a dev dependency, which gets stripped by `cargo install`, and `cargo install` fails with a missing crate error. As workaround, we make `uv-test` a regular optional dependency. It's never used as a regular dependency, but it allows using `uv-test?/git` as default feature. Closes #17908 Fixes #17955
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
test-defaultsfrom thedefaultfeature set incrates/uv/Cargo.tomltest-defaultsexplicitly to the Linux CI test features intest.ymlThe
test-defaultsfeature propagates features touv-test, which is a dev-dependency. Sincecargo installstrips dev-dependencies, this causes installation to fail:This was introduced by #17551 (splitting
TestContextinto a dedicateduv-testcrate). macOS and Windows CI already use--no-default-featureswith explicit feature lists, so they are unaffected. Linux CI neededtest-defaultsadded to its explicit feature list.Test plan
cargo check -p uvsucceeds with the new default featurescargo install --path crates/uvsucceedstest-defaultsexplicitly enabled for Linux