diff --git a/.config/hakari.toml b/.config/hakari.toml index 1066bcd3b23..3ec44a85c3a 100644 --- a/.config/hakari.toml +++ b/.config/hakari.toml @@ -1,7 +1,7 @@ # This file contains settings for `cargo hakari`. # See https://docs.rs/cargo-hakari/latest/cargo_hakari/config for a full list of options. -hakari-package = "workspace-hack" +hakari-package = "guppy-workspace-hack" # 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.lock b/Cargo.lock index d144642f071..ec8ccab8f39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -265,13 +265,13 @@ dependencies = [ "dialoguer", "guppy", "guppy-cmdlib", + "guppy-workspace-hack", "itertools", "pathdiff", "serde", "serde_json", "structopt", "toml_edit", - "workspace-hack", ] [[package]] @@ -286,13 +286,13 @@ dependencies = [ "enable-ansi-support", "env_logger", "guppy", + "guppy-workspace-hack", "hakari", "log", "owo-colors 3.1.0", "structopt", "supports-color", "tempfile", - "workspace-hack", ] [[package]] @@ -653,13 +653,13 @@ dependencies = [ "fixtures", "globset", "guppy", + "guppy-workspace-hack", "itertools", "once_cell", "petgraph", "rayon", "serde", "toml", - "workspace-hack", ] [[package]] @@ -782,12 +782,12 @@ dependencies = [ "fixtures", "guppy", "guppy-cmdlib", + "guppy-workspace-hack", "hakari", "once_cell", "proptest", "proptest-ext", "structopt", - "workspace-hack", ] [[package]] @@ -796,10 +796,10 @@ version = "0.1.0" dependencies = [ "camino", "guppy", + "guppy-workspace-hack", "once_cell", "pathdiff", "pretty_assertions", - "workspace-hack", ] [[package]] @@ -930,6 +930,7 @@ dependencies = [ "fixedbitset", "fixtures", "guppy-summaries", + "guppy-workspace-hack", "indexmap", "itertools", "nested", @@ -946,7 +947,6 @@ dependencies = [ "smallvec", "target-spec", "toml", - "workspace-hack", ] [[package]] @@ -955,9 +955,9 @@ version = "0.1.0" dependencies = [ "criterion", "guppy", + "guppy-workspace-hack", "proptest", "proptest-ext", - "workspace-hack", ] [[package]] @@ -966,9 +966,9 @@ version = "0.1.0" dependencies = [ "anyhow", "guppy", + "guppy-workspace-hack", "proptest", "structopt", - "workspace-hack", ] [[package]] @@ -978,12 +978,37 @@ dependencies = [ "camino", "cfg-if", "diffus", + "guppy-workspace-hack", "pretty_assertions", "semver", "serde", "serde_json", "toml", - "workspace-hack", +] + +[[package]] +name = "guppy-workspace-hack" +version = "0.1.0" +dependencies = [ + "bstr", + "clap", + "itoa", + "libc", + "log", + "memchr", + "num-traits", + "owo-colors 3.1.0", + "petgraph", + "proc-macro2 1.0.32", + "quote 1.0.10", + "regex", + "regex-syntax", + "semver", + "serde", + "serde_json", + "syn 1.0.82", + "toml", + "winapi", ] [[package]] @@ -998,6 +1023,7 @@ dependencies = [ "diffy", "fixtures", "guppy", + "guppy-workspace-hack", "include_dir", "indenter", "itertools", @@ -1012,7 +1038,6 @@ dependencies = [ "toml", "toml_edit", "twox-hash", - "workspace-hack", ] [[package]] @@ -1616,9 +1641,9 @@ dependencies = [ name = "proptest-ext" version = "0.1.0" dependencies = [ + "guppy-workspace-hack", "proptest", "twox-hash", - "workspace-hack", ] [[package]] @@ -2056,11 +2081,11 @@ name = "target-spec" version = "0.9.0" dependencies = [ "cfg-expr", + "guppy-workspace-hack", "proptest", "serde", "target-lexicon", "toml", - "workspace-hack", ] [[package]] @@ -2394,31 +2419,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "workspace-hack" -version = "0.1.0" -dependencies = [ - "bstr", - "clap", - "itoa", - "libc", - "log", - "memchr", - "num-traits", - "owo-colors 3.1.0", - "petgraph", - "proc-macro2 1.0.32", - "quote 1.0.10", - "regex", - "regex-syntax", - "semver", - "serde", - "serde_json", - "syn 1.0.82", - "toml", - "winapi", -] - [[package]] name = "zeroize" version = "1.4.3" diff --git a/cargo-guppy/Cargo.toml b/cargo-guppy/Cargo.toml index ab07a9dc04a..97b5e6f81a5 100644 --- a/cargo-guppy/Cargo.toml +++ b/cargo-guppy/Cargo.toml @@ -18,4 +18,4 @@ serde = { version = "1.0.130", features = ["derive"] } serde_json = "1.0.72" structopt = "0.3.25" toml_edit = "0.10.1" -workspace-hack = { version = "0.1", path = "../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" } diff --git a/fixtures/Cargo.toml b/fixtures/Cargo.toml index a9989e6d54c..076f28bf020 100644 --- a/fixtures/Cargo.toml +++ b/fixtures/Cargo.toml @@ -11,4 +11,4 @@ guppy = { path = "../guppy" } once_cell = "1.8.0" pathdiff = "0.2.0" pretty_assertions = "1.0.0" -workspace-hack = { version = "0.1", path = "../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" } diff --git a/guppy-cmdlib/Cargo.toml b/guppy-cmdlib/Cargo.toml index a86dd99163c..7cfde4b467c 100644 --- a/guppy-cmdlib/Cargo.toml +++ b/guppy-cmdlib/Cargo.toml @@ -12,7 +12,7 @@ anyhow = "1.0.44" guppy = { path = "../guppy" } structopt = "0.3.25" proptest = { version = "1.0.0", optional = true } -workspace-hack = { version = "0.1", path = "../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" } [features] proptest1 = ["proptest", "guppy/proptest1"] diff --git a/guppy-summaries/Cargo.toml b/guppy-summaries/Cargo.toml index 86063c8fa64..374b9acb049 100644 --- a/guppy-summaries/Cargo.toml +++ b/guppy-summaries/Cargo.toml @@ -22,7 +22,7 @@ diffus = "0.10.0" toml = { version = "0.5.8", features = ["preserve_order"] } semver = { version = "1.0.4", features = ["serde"] } serde = { version = "1.0.130", features = ["derive"] } -workspace-hack = { version = "0.1", path = "../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" } [dev-dependencies] pretty_assertions = "1.0.0" diff --git a/guppy/Cargo.toml b/guppy/Cargo.toml index b0ac0749ad2..b9b0c656d50 100644 --- a/guppy/Cargo.toml +++ b/guppy/Cargo.toml @@ -53,7 +53,7 @@ serde_json = "1.0.72" smallvec = "1.7.0" target-spec = { version = "0.9.0", path = "../target-spec" } toml = { version = "0.5.8", optional = true, features = ["preserve_order"] } -workspace-hack = { version = "0.1", path = "../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" } [dev-dependencies] fixtures = { path = "../fixtures" } diff --git a/internal-tools/benchmarks/Cargo.toml b/internal-tools/benchmarks/Cargo.toml index cff4b6a06a5..e0227bb22e0 100644 --- a/internal-tools/benchmarks/Cargo.toml +++ b/internal-tools/benchmarks/Cargo.toml @@ -9,7 +9,7 @@ publish = false # this is a private crate guppy = { path = "../../guppy", features = ["proptest1"] } proptest = "1.0.0" proptest-ext = { path = "../proptest-ext" } -workspace-hack = { version = "0.1", path = "../../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" } [dev-dependencies] criterion = "0.3.5" diff --git a/internal-tools/fixture-manager/Cargo.toml b/internal-tools/fixture-manager/Cargo.toml index fddad91da00..bbccb723518 100644 --- a/internal-tools/fixture-manager/Cargo.toml +++ b/internal-tools/fixture-manager/Cargo.toml @@ -18,4 +18,4 @@ once_cell = "1.8.0" proptest = "1.0.0" proptest-ext = { path = "../proptest-ext" } structopt = "0.3.25" -workspace-hack = { version = "0.1", path = "../../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" } diff --git a/internal-tools/proptest-ext/Cargo.toml b/internal-tools/proptest-ext/Cargo.toml index 0563ced9665..4d51311ce2a 100644 --- a/internal-tools/proptest-ext/Cargo.toml +++ b/internal-tools/proptest-ext/Cargo.toml @@ -10,4 +10,4 @@ publish = false # this is a private crate [dependencies] proptest = "1.0.0" twox-hash = { version = "1.6.1", default-features = false } -workspace-hack = { version = "0.1", path = "../../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" } diff --git a/target-spec/Cargo.toml b/target-spec/Cargo.toml index 6662d5cd233..7261288d76e 100644 --- a/target-spec/Cargo.toml +++ b/target-spec/Cargo.toml @@ -22,7 +22,7 @@ cfg-expr = { version = "0.9.0", features = ["targets"] } proptest = { version = "1.0.0", optional = true } serde = { version = "1.0.130", optional = true, features = ["derive"] } target-lexicon = { version = "0.12.2", features = ["std"] } -workspace-hack = { version = "0.1", path = "../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../workspace-hack" } [dev-dependencies] toml = "0.5.8" diff --git a/tools/cargo-hakari/Cargo.toml b/tools/cargo-hakari/Cargo.toml index d6cf7b3f702..4b2595a1f1d 100644 --- a/tools/cargo-hakari/Cargo.toml +++ b/tools/cargo-hakari/Cargo.toml @@ -33,7 +33,7 @@ log = "0.4.14" owo-colors = { version = "3.1.0", features = ["supports-colors"] } supports-color = "1.3.0" structopt = "0.3.25" -workspace-hack = { version = "0.1", path = "../../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" } [dev-dependencies] tempfile = "3.2.0" diff --git a/tools/determinator/Cargo.toml b/tools/determinator/Cargo.toml index f24869e6750..cfcffa9a8a6 100644 --- a/tools/determinator/Cargo.toml +++ b/tools/determinator/Cargo.toml @@ -36,7 +36,7 @@ petgraph = { version = "0.6.0", default-features = false, features = ["graphmap" rayon = "1.5.1" serde = { version = "1.0.130", features = ["derive"] } toml = "0.5.8" -workspace-hack = { version = "0.1", path = "../../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" } [dev-dependencies] fixtures = { path = "../../fixtures" } diff --git a/tools/hakari/Cargo.toml b/tools/hakari/Cargo.toml index 08262e440b9..7fcfcb05807 100644 --- a/tools/hakari/Cargo.toml +++ b/tools/hakari/Cargo.toml @@ -43,7 +43,7 @@ target-spec = { version = "0.9.0", path = "../../target-spec" } toml = { version = "0.5.8", optional = true } toml_edit = "0.10.1" twox-hash = { version = "1.6.1", default-features = false } -workspace-hack = { version = "0.1", path = "../../workspace-hack" } +guppy-workspace-hack = { version = "0.1", path = "../../workspace-hack" } [dev-dependencies] fixtures = { path = "../../fixtures" } diff --git a/tools/hakari/README.md b/tools/hakari/README.md index c08becdc04b..b0d27cbd397 100644 --- a/tools/hakari/README.md +++ b/tools/hakari/README.md @@ -17,7 +17,8 @@ let package_graph = MetadataCommand::new() .expect("obtained cargo-guppy's PackageGraph"); // The second argument to HakariBuilder::new specifies a Hakari (workspace-hack) package. -let hakari_package = package_graph.workspace().member_by_name("workspace-hack").unwrap().id(); +// In this repository, the package is called "guppy-workspace-hack". +let hakari_package = package_graph.workspace().member_by_name("guppy-workspace-hack").unwrap().id(); let hakari_builder = HakariBuilder::new(&package_graph, Some(hakari_package)) .expect("HakariBuilder was constructed"); diff --git a/tools/hakari/src/lib.rs b/tools/hakari/src/lib.rs index 69bb30202d1..8866a56d3f9 100644 --- a/tools/hakari/src/lib.rs +++ b/tools/hakari/src/lib.rs @@ -18,7 +18,8 @@ //! .expect("obtained cargo-guppy's PackageGraph"); //! //! // The second argument to HakariBuilder::new specifies a Hakari (workspace-hack) package. -//! let hakari_package = package_graph.workspace().member_by_name("workspace-hack").unwrap().id(); +//! // In this repository, the package is called "guppy-workspace-hack". +//! let hakari_package = package_graph.workspace().member_by_name("guppy-workspace-hack").unwrap().id(); //! let hakari_builder = HakariBuilder::new(&package_graph, Some(hakari_package)) //! .expect("HakariBuilder was constructed"); //! diff --git a/workspace-hack/Cargo.toml b/workspace-hack/Cargo.toml index 2d8e0b4fcff..623b6822d9a 100644 --- a/workspace-hack/Cargo.toml +++ b/workspace-hack/Cargo.toml @@ -3,7 +3,7 @@ # cargo hakari generate [package] -name = "workspace-hack" +name = "guppy-workspace-hack" version = "0.1.0" description = "workspace-hack package, managed by hakari" publish = true