Skip to content

Commit

Permalink
Auto merge of #12352 - epage:meta, r=weihanglo
Browse files Browse the repository at this point in the history
refactor: Clean up package metadata

### What does this PR try to resolve?

Clean up workspace metadata
- Reduce noise by allowing fields to be inferred
  - I left documentation because that is runtime inferred on crates.io which has trade offs
- Default package fields at the workspace level

Align us on a single edition

### How should we test and review this PR?

Mostly relying on CI for this

### Additional information

I noticed this and decided to do this while I was considering the idea of setting an MSRV to "latest" by leveraging #12341 and whether that should just be for `cargo` or for all workspace members.  I'm leaning towards all workspace members as that is the only thing we test though strictly speaking people might be able to use lower versions; we just wouldn't officially support it.
  • Loading branch information
bors committed Jul 17, 2023
2 parents 31eda6f + 83a5859 commit e1e2f2d
Show file tree
Hide file tree
Showing 21 changed files with 46 additions and 44 deletions.
6 changes: 3 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,20 @@ exclude = [
"target/", # exclude bench testing
]

[workspace.package]
edition = "2021"
license = "MIT OR Apache-2.0"

[workspace.dependencies]
anyhow = "1.0.47"
base64 = "0.21.0"
bytesize = "1.0"
cargo = { path = "" }
cargo-credential = { version = "0.2.0", path = "credential/cargo-credential" }
cargo-platform = { path = "crates/cargo-platform", version = "0.1.3" }
cargo-platform = { path = "crates/cargo-platform", version = "0.1.4" }
cargo-test-macro = { path = "crates/cargo-test-macro" }
cargo-test-support = { path = "crates/cargo-test-support" }
cargo-util = { version = "0.2.4", path = "crates/cargo-util" }
cargo-util = { version = "0.2.5", path = "crates/cargo-util" }
cargo_metadata = "0.14.0"
clap = "4.2.0"
core-foundation = { version = "0.9.0", features = ["mac_os_10_7_support"] }
Expand Down Expand Up @@ -96,12 +100,11 @@ windows-sys = "0.48"
[package]
name = "cargo"
version = "0.74.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
homepage = "https://crates.io"
repository = "https://github.com/rust-lang/cargo"
documentation = "https://docs.rs/cargo"
readme = "README.md"
description = """
Cargo, a package manager for Rust.
"""
Expand Down
4 changes: 2 additions & 2 deletions benches/benchsuite/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "benchsuite"
version = "0.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo"
description = "Benchmarking suite for Cargo."
Expand Down
4 changes: 2 additions & 2 deletions benches/capture/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "capture"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
description = "Tool for capturing a real-world workspace for benchmarking."
publish = false

Expand Down
6 changes: 3 additions & 3 deletions crates/cargo-platform/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-platform"
version = "0.1.3"
edition = "2021"
license = "MIT OR Apache-2.0"
version = "0.1.4"
edition.workspace = true
license.workspace = true
homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo"
documentation = "https://docs.rs/cargo-platform"
Expand Down
4 changes: 2 additions & 2 deletions crates/cargo-test-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-test-macro"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo"
documentation = "https://github.com/rust-lang/cargo"
Expand Down
4 changes: 2 additions & 2 deletions crates/cargo-test-support/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-test-support"
version = "0.1.0"
license = "MIT OR Apache-2.0"
edition = "2021"
license.workspace = true
edition.workspace = true
publish = false

[lib]
Expand Down
6 changes: 3 additions & 3 deletions crates/cargo-util/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-util"
version = "0.2.4"
edition = "2021"
license = "MIT OR Apache-2.0"
version = "0.2.5"
edition.workspace = true
license.workspace = true
homepage = "https://github.com/rust-lang/cargo"
repository = "https://github.com/rust-lang/cargo"
description = "Miscellaneous support code used by Cargo."
Expand Down
4 changes: 2 additions & 2 deletions crates/crates-io/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "crates-io"
version = "0.37.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = """
Helpers for interacting with crates.io
Expand Down
5 changes: 2 additions & 3 deletions crates/home/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ name = "home"
version = "0.5.6" # also update `html_root_url` in `src/lib.rs`
authors = ["Brian Anderson <[email protected]>"]
documentation = "https://docs.rs/home"
edition = "2018"
edition.workspace = true
include = [
"/src",
"/Cargo.toml",
"/CHANGELOG",
"/LICENSE-*",
"/README.md",
]
license = "MIT OR Apache-2.0"
readme = "README.md"
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "Shared definitions of home directories."

Expand Down
4 changes: 2 additions & 2 deletions crates/mdman/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "mdman"
version = "0.0.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
description = "Creates a man page page from markdown."
publish = false

Expand Down
2 changes: 1 addition & 1 deletion crates/resolver-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "resolver-tests"
version = "0.0.0"
edition = "2018"
edition.workspace = true
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/semver-check/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "semver-check"
version = "0.0.0"
authors = ["Eric Huss"]
edition = "2021"
edition.workspace = true
publish = false

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion crates/xtask-build-man/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "xtask-build-man"
version = "0.0.0"
edition = "2021"
edition.workspace = true
publish = false

[dependencies]
2 changes: 1 addition & 1 deletion crates/xtask-stale-label/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "xtask-stale-label"
version = "0.0.0"
edition = "2021"
edition.workspace = true
publish = false

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion crates/xtask-unpublished/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "xtask-unpublished"
version = "0.0.0"
edition = "2021"
edition.workspace = true
publish = false

[dependencies]
Expand Down
4 changes: 2 additions & 2 deletions credential/cargo-credential-1password/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-credential-1password"
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens in a 1password vault."

Expand Down
4 changes: 2 additions & 2 deletions credential/cargo-credential-gnome-secret/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-credential-gnome-secret"
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens with GNOME libsecret."

Expand Down
4 changes: 2 additions & 2 deletions credential/cargo-credential-macos-keychain/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-credential-macos-keychain"
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens in a macOS keychain."

Expand Down
4 changes: 2 additions & 2 deletions credential/cargo-credential-wincred/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-credential-wincred"
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "A Cargo credential process that stores tokens with Windows Credential Manager."

Expand Down
4 changes: 2 additions & 2 deletions credential/cargo-credential/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "cargo-credential"
version = "0.2.0"
edition = "2021"
license = "MIT OR Apache-2.0"
edition.workspace = true
license.workspace = true
repository = "https://github.com/rust-lang/cargo"
description = "A library to assist writing Cargo credential helpers."

Expand Down

0 comments on commit e1e2f2d

Please sign in to comment.