-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Example workspace inheritance port #3719
Conversation
clap = { path = ".", version = "3.1.10", default-features = false, features = ["std"] } | ||
clap_derive = { path = "./clap_derive", version = "=3.1.18" } | ||
clap_lex = { path = "./clap_lex", version = "0.2.0" } | ||
os_str_bytes = { version = "6.0", default-features = false, features = ["raw_os_str"] } |
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.
FYI os_str_bytes
is needed to be shared because its a public dependency of clap_lex
though clap_lex
re-exports parts of it, so maybe we could pull this from clap
depending on it?
shlex = "1.1.0" | ||
snapbox = "0.2.9" | ||
trycmd = { version = "0.13", default-features = false, features = ["color-auto", "diff", "examples"] } |
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.
FYI these are shared to reduce duplicate dependencies
@@ -7,32 +9,39 @@ members = [ | |||
"clap_mangen", | |||
] | |||
|
|||
[workspace.package] | |||
categories = ["command-line-interface"] | |||
edition = "2018" |
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.
FYI While there are cases where people might want different editions in a workspace, I think its a good idea to generally consolidate and share it. Similar for rust- version
.
Thanks! |
11664f7
to
3e99c5e
Compare
"LICENSE-*", | ||
"README.md" | ||
] | ||
version.workspace = true |
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.
FYI Before, we only could enforce clap
and clap_derive
shared a version via cargo-release
but now we can do it here.
include = [ | ||
"src/**/*", | ||
"Cargo.toml", | ||
"LICENSE-*", | ||
"README.md" | ||
] |
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.
FYI Our includes are meant to be the same but have diverged over time. Now we'll be able to keep them the same!
3e99c5e
to
7eb5456
Compare
@@ -39,7 +36,7 @@ roff = "0.2.1" | |||
clap = { path = "../", version = "3.1.10", default-features = false, features = ["std", "env"] } | |||
|
|||
[dev-dependencies] | |||
snapbox = { version = "0.2", features = ["diff"] } | |||
snapbox = { workspace = true, features = ["diff"] } |
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.
How come diff
isn't in the workspace?
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.
Not every user of snapbox needs diff
so I left it only in this spot
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.
Thats a bug. diff
improves the output of snapbox and we always want it.
This is a draft PR to represent what it would look like to port an existing project to using
{key}.workspace = true
in its workspace members.