feat: Support Cargo workspace inheritance#359
Open
bb010g wants to merge 1 commit intokbknapp:masterfrom
Open
Conversation
|
This is not enough to fix the following case, where there is a path dependency on a package that is part of a separate workspace: #!/usr/bin/env bash
mkdir testcrate
cd testcrate
mkdir src && touch src/lib.rs
cat > Cargo.toml <<-EOF
[package]
name = "testcrate"
version = "0.1.0"
edition = "2021"
[dependencies]
ws_member = { path = "ws_dep/ws_member" }
EOF
mkdir ws_dep
cd ws_dep
cat > Cargo.toml <<-EOF
[workspace]
members = ["ws_member"]
resolver = "2"
[workspace.package]
version = "0.1.0"
EOF
mkdir ws_member
cd ws_member
mkdir src && touch src/lib.rs
cat > Cargo.toml <<-EOF
[package]
name = "ws_member"
version.workspace = true
edition = "2021"
EOFThe check here needs to be generalized not just for the workspace of the root package, but for all dependency packages. |
|
FYI, I've rebased this on master and factored out all the unrelated changes in this branch of mine, you might want to work off that if you continue with this: https://github.com/Xiretza/cargo-outdated/tree/workspace-inheritance |
Owner
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.
Virtual workspaces are generally less special now. Logging coverage has increased where it was useful during debugging. Switching to
Path::strip_prefixfrom substrings usingPath::to_str_lossyhas fixed possible confusion when temporary paths are long. Cargo&Packagevalues are carried around longer now so that the user doesn't have to write explicitlibtables into theirCargo.tomlfiles to avoid warnings.Fixes #325.