From 1ef25ae89d21a3a08d3f8f5639018427dd2e4cd8 Mon Sep 17 00:00:00 2001 From: Rain Date: Sun, 26 Nov 2023 16:45:15 -0800 Subject: [PATCH] [workspace-hack] use workspace-dotted scheme + patch We use this for both guppy and omicron now and it works really well. --- .config/hakari.toml | 1 + Cargo.toml | 4 ++++ cargo-nextest/Cargo.toml | 2 +- integration-tests/Cargo.toml | 2 +- nextest-filtering/Cargo.toml | 2 +- nextest-metadata/Cargo.toml | 2 +- nextest-runner/Cargo.toml | 2 +- quick-junit/Cargo.toml | 2 +- 8 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.config/hakari.toml b/.config/hakari.toml index 17243fa9b43..d3ddddfe0ff 100644 --- a/.config/hakari.toml +++ b/.config/hakari.toml @@ -4,6 +4,7 @@ hakari-package = "nextest-workspace-hack" dep-format-version = "4" +workspace-hack-line-style = "workspace-dotted" # Setting workspace.resolver = "2" in the root Cargo.toml is HIGHLY recommended. # Hakari works much better with the new feature resolver. diff --git a/Cargo.toml b/Cargo.toml index eadce022e00..c7408b3aba2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,6 +11,7 @@ members = [ ] [workspace.dependencies] +nextest-workspace-hack = "0.1.0" # make backtrace + color-eyre faster on debug builds [profile.dev.package.backtrace] @@ -23,6 +24,9 @@ opt-level = 3 [profile.dev.package.similar] opt-level = 3 +[patch.crates-io] +nextest-workspace-hack = { path = "workspace-hack" } + # Uncomment for testing. # [patch.crates-io] # cargo_metadata = { path = "../cargo_metadata" } diff --git a/cargo-nextest/Cargo.toml b/cargo-nextest/Cargo.toml index 5b0cb75e8b9..988878cc7a0 100644 --- a/cargo-nextest/Cargo.toml +++ b/cargo-nextest/Cargo.toml @@ -38,7 +38,7 @@ supports-color = "2.1.0" supports-unicode = "2.0.0" serde_json = "1.0.108" thiserror = "1.0.50" -nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" } +nextest-workspace-hack.workspace = true [features] default = ["default-no-update", "self-update"] diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 3ff778f7670..0191e22e3f7 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -15,7 +15,7 @@ cargo-nextest = { path = "../cargo-nextest" } color-eyre = { version = "0.6.2", default-features = false } clap = { version = "4.4.8", features = ["derive", "env"] } enable-ansi-support = "0.2.1" -nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" } +nextest-workspace-hack.workspace = true [dev-dependencies] camino = "1.1.6" diff --git a/nextest-filtering/Cargo.toml b/nextest-filtering/Cargo.toml index 0f01cde0b4a..95feece61e6 100644 --- a/nextest-filtering/Cargo.toml +++ b/nextest-filtering/Cargo.toml @@ -35,10 +35,10 @@ recursion = "0.5.1" regex = "1.10.2" regex-syntax = "0.8.2" thiserror = "1.0.50" -nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" } proptest = { version = "1.4.0", optional = true } test-strategy = { version = "0.3.1", optional = true } twox-hash = { version = "1.6.3", optional = true } +nextest-workspace-hack.workspace = true [dev-dependencies] clap = { version = "4.4.8", features = ["derive"] } diff --git a/nextest-metadata/Cargo.toml b/nextest-metadata/Cargo.toml index b914873d6b2..140b0ba19ef 100644 --- a/nextest-metadata/Cargo.toml +++ b/nextest-metadata/Cargo.toml @@ -16,8 +16,8 @@ camino = { version = "1.1.6", features = ["serde1"] } serde = { version = "1.0.193", features = ["derive"] } serde_json = "1.0.108" target-spec = { version = "3.0.1", features = ["custom", "summaries"] } -nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" } smol_str = { version = "0.2.0", features = ["serde"] } +nextest-workspace-hack.workspace = true [dev-dependencies] test-case = "3.3.1" diff --git a/nextest-runner/Cargo.toml b/nextest-runner/Cargo.toml index ecd7f9f06f2..6688e451f7f 100644 --- a/nextest-runner/Cargo.toml +++ b/nextest-runner/Cargo.toml @@ -90,12 +90,12 @@ nextest-filtering = { version = "0.5.1", path = "../nextest-filtering" } nextest-metadata = { version = "0.9.2", path = "../nextest-metadata" } quick-junit = { version = "0.3.5", path = "../quick-junit" } uuid = { version = "1.6.1", features = ["v4"] } -nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" } console-subscriber = { version = "0.2.0", optional = true } unicode-ident = "1.0.12" unicode-normalization = "0.1.22" indexmap = { version = "2.1.0", features = ["serde"] } smallvec = "1.11.2" +nextest-workspace-hack.workspace = true [target.'cfg(unix)'.dependencies] libc = "0.2.150" diff --git a/quick-junit/Cargo.toml b/quick-junit/Cargo.toml index d2785bb5f33..6c3f7d6ee72 100644 --- a/quick-junit/Cargo.toml +++ b/quick-junit/Cargo.toml @@ -17,8 +17,8 @@ indexmap = "2.1.0" quick-xml = "0.31.0" thiserror = "1.0.50" uuid = "1.6.1" -nextest-workspace-hack = { version = "0.1", path = "../workspace-hack" } strip-ansi-escapes = "0.2.0" +nextest-workspace-hack.workspace = true [dev-dependencies] goldenfile = "1.6.0"