Skip to content

Commit

Permalink
[workspace-hack] switch to workspace-dotted + patch directive
Browse files Browse the repository at this point in the history
Docs about the `[patch]` directive will come at some future point. For
now, try it out.
  • Loading branch information
sunshowers committed Oct 4, 2023
1 parent d05f05e commit 2626bb0
Show file tree
Hide file tree
Showing 16 changed files with 26 additions and 14 deletions.
1 change: 1 addition & 0 deletions .config/hakari.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ resolver = "2"
# Format version for cargo-hakari's output.
# See https://docs.rs/cargo-hakari/latest/cargo_hakari/config#dep-format-version for more.
dep-format-version = "4"
workspace-hack-line-style = "workspace-dotted"

# Add triples corresponding to platforms commonly used by developers here.
# https://doc.rust-lang.org/rustc/platform-support.html
Expand Down
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ members = [
"workspace-hack",
]

[workspace.dependencies]
guppy-workspace-hack = "0.1.0"

[patch.crates-io.guppy-workspace-hack]
path = "workspace-hack"

# Recommended for color-eyre
[profile.dev.package.backtrace]
opt-level = 3
Expand Down
2 changes: 1 addition & 1 deletion cargo-guppy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ pathdiff = { version = "0.2.1", features = ["camino"] }
serde = { version = "1.0.188", features = ["derive"] }
serde_json = "1.0.107"
toml_edit = "0.17.1"
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
guppy-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion fixtures/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ guppy = { path = "../guppy" }
once_cell = "1.18.0"
pathdiff = "0.2.1"
pretty_assertions = "1.4.0"
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
guppy-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion guppy-cmdlib/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ clap = { version = "3.2.25", features = ["derive"] }
color-eyre = { version = "0.6.2", default-features = false }
guppy = { path = "../guppy" }
proptest = { version = "1.2.0", optional = true }
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
guppy-workspace-hack.workspace = true

[features]
proptest1 = ["proptest", "guppy/proptest1"]
2 changes: 1 addition & 1 deletion guppy-summaries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ diffus = "0.10.0"
toml = { version = "0.5.11", features = ["preserve_order"] }
semver = { version = "1.0.19", features = ["serde"] }
serde = { version = "1.0.188", features = ["derive"] }
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
guppy-workspace-hack.workspace = true

[dev-dependencies]
indoc = "2.0.4"
Expand Down
2 changes: 1 addition & 1 deletion guppy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ smallvec = "1.11.1"
static_assertions = "1.1.0"
target-spec = { version = "3.0.1", path = "../target-spec" }
toml = { version = "0.5.11", optional = true, features = ["preserve_order"] }
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
guppy-workspace-hack.workspace = true

[dev-dependencies]
fixtures = { path = "../fixtures" }
Expand Down
2 changes: 1 addition & 1 deletion internal-tools/benchmarks/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ publish = false # this is a private crate
guppy = { path = "../../guppy", features = ["proptest1"] }
proptest = "1.2.0"
proptest-ext = { path = "../proptest-ext" }
guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
guppy-workspace-hack.workspace = true

[dev-dependencies]
criterion = "0.5.1"
Expand Down
2 changes: 1 addition & 1 deletion internal-tools/fixture-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ once_cell = "1.18.0"
proptest = "1.2.0"
proptest-ext = { path = "../proptest-ext" }
structopt = "0.3.26"
guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
guppy-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion internal-tools/proptest-ext/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ publish = false # this is a private crate
[dependencies]
proptest = "1.2.0"
twox-hash = { version = "1.6.3", default-features = false }
guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
guppy-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion target-spec-miette/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ rust-version = "1.70"
[dependencies]
target-spec = { version = "3.0.1", path = "../target-spec" }
miette = "5.10.0"
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
guppy-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion target-spec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ proptest = { version = "1.2.0", optional = true }
serde = { version = "1.0.188", optional = true, features = ["derive"] }
serde_json = { version = "1.0.107", optional = true }
target-lexicon = { version = "0.12.11", features = ["std"] }
guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" }
unicode-ident = "1.0.12"
guppy-workspace-hack.workspace = true

[dev-dependencies]
rustc_version = "0.4.0"
Expand Down
2 changes: 1 addition & 1 deletion tools/cargo-hakari/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ hakari = { version = "0.17.1", path = "../hakari", features = ["cli-support"] }
log = "0.4.20"
owo-colors = { version = "3.5.0", features = ["supports-colors"] }
supports-color = "1.3.1"
guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
guppy-workspace-hack.workspace = true

[dev-dependencies]
tempfile = "3.8.0"
Expand Down
7 changes: 6 additions & 1 deletion tools/cargo-hakari/src/docs/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,12 @@
//!
//! ## workspace-hack-line-style
//!
//! Style of `workspace-hack` lines to output.
//! Style of `workspace-hack` lines to output. After changing this, you must run:
//!
//! ```sh
//! cargo hakari remove-deps
//! cargo hakari manage-deps
//! ```
//!
//! Possible values:
//! * *"full"*: `my-workspace-hack = { version = "0.1", path = ... }`. This is the default and a
Expand Down
2 changes: 1 addition & 1 deletion tools/determinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ petgraph = { version = "0.6.4", default-features = false, features = [
rayon = "1.8.0"
serde = { version = "1.0.188", features = ["derive"] }
toml = "0.5.11"
guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
guppy-workspace-hack.workspace = true

[dev-dependencies]
fixtures = { path = "../../fixtures" }
Expand Down
2 changes: 1 addition & 1 deletion tools/hakari/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ target-spec = { version = "3.0.1", path = "../../target-spec" }
toml = { version = "0.5.11", optional = true }
toml_edit = "0.17.1"
twox-hash = { version = "1.6.3", default-features = false }
guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
guppy-workspace-hack.workspace = true

[dev-dependencies]
fixtures = { path = "../../fixtures" }
Expand Down

0 comments on commit 2626bb0

Please sign in to comment.