-
-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[workspace] | ||
members = [ | ||
"clap_derive", | ||
|
@@ -7,9 +9,29 @@ members = [ | |
"clap_mangen", | ||
] | ||
|
||
[workspace.package] | ||
version = "3.1.18" | ||
edition = "2018" | ||
include = [ | ||
"build.rs", | ||
"src/**/*", | ||
"Cargo.toml", | ||
"LICENSE*", | ||
"README.md", | ||
"benches/**/*", | ||
"examples/**/*" | ||
] | ||
license = "MIT OR Apache-2.0" | ||
|
||
[workspace.dependencies] | ||
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 commentThe reason will be displayed to describe this comment to others. Learn more. FYI |
||
shlex = "1.1.0" | ||
snapbox = "0.2.9" | ||
trycmd = { version = "0.13", default-features = false, features = ["color-auto", "diff", "examples"] } | ||
Comment on lines
+28
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI these are shared to reduce duplicate dependencies |
||
|
||
[package] | ||
name = "clap" | ||
version = "3.1.18" | ||
version.workspace = true | ||
description = "A simple to use, efficient, and full-featured Command Line Argument Parser" | ||
repository = "https://github.com/clap-rs/clap" | ||
documentation = "https://docs.rs/clap/" | ||
|
@@ -21,18 +43,10 @@ keywords = [ | |
"parser", | ||
"parse" | ||
] | ||
edition = "2018" | ||
license = "MIT OR Apache-2.0" | ||
edition.workspace = true | ||
license.workspace = true | ||
readme = "README.md" | ||
include = [ | ||
"build.rs", | ||
"src/**/*", | ||
"Cargo.toml", | ||
"LICENSE*", | ||
"README.md", | ||
"benches/**/*", | ||
"examples/**/*" | ||
] | ||
include.workspace = true | ||
|
||
[package.metadata.docs.rs] | ||
features = ["unstable-doc"] | ||
|
@@ -141,10 +155,10 @@ criterion = "0.3.2" | |
trybuild = "1.0.18" | ||
rustversion = "1" | ||
# Cutting out `filesystem` feature | ||
trycmd = { version = "0.13", default-features = false, features = ["color-auto", "diff", "examples"] } | ||
trycmd.workspace = true | ||
humantime = "2" | ||
snapbox = "0.2.9" | ||
shlex = "1.1.0" | ||
snapbox.workspace = true | ||
shlex.workspace = true | ||
|
||
[[example]] | ||
name = "demo" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "clap_derive" | ||
version = "3.1.18" | ||
edition = "2018" | ||
include = [ | ||
"src/**/*", | ||
"Cargo.toml", | ||
"LICENSE-*", | ||
"README.md" | ||
] | ||
Comment on lines
-5
to
-10
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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! |
||
version.workspace = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. FYI Before, we only could enforce |
||
edition.workspace = true | ||
include.workspace = true | ||
description = "Parse command line argument by defining a struct, derive crate." | ||
repository = "https://github.com/clap-rs/clap/tree/master/clap_derive" | ||
documentation = "https://docs.rs/clap_derive" | ||
|
@@ -19,7 +16,7 @@ keywords = [ | |
"proc_macro" | ||
] | ||
categories = ["command-line-interface", "development-tools::procedural-macro-helpers"] | ||
license = "MIT OR Apache-2.0" | ||
license.workspace = true | ||
readme = "README.md" | ||
|
||
[package.metadata.release] | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
cargo-features = ["workspace-inheritance"] | ||
|
||
[package] | ||
name = "clap_mangen" | ||
version = "0.1.6" | ||
edition = "2018" | ||
include = [ | ||
"src/**/*", | ||
"Cargo.toml", | ||
"LICENSE-*", | ||
"README.md" | ||
] | ||
edition.workspace = true | ||
include.workspace = true | ||
description = "A manpage generator for clap" | ||
repository = "https://github.com/clap-rs/clap/tree/master/clap_mangen" | ||
documentation = "https://docs.rs/clap_mangen" | ||
|
@@ -18,7 +15,7 @@ keywords = [ | |
"manpage", | ||
] | ||
categories = ["command-line-interface"] | ||
license = "MIT OR Apache-2.0" | ||
license.workspace = true | ||
readme = "README.md" | ||
|
||
[package.metadata.release] | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. How come There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not every user of snapbox needs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thats a bug. |
||
clap = { path = "../", version = "3.1.10", default-features = false, features = ["std"] } | ||
|
||
[features] | ||
|
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
.