From f47515bce5c433214dbecee262a7a6f14e6a74d4 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 7 Jun 2021 02:24:48 +0900 Subject: [PATCH] Use `[patch.crates-io]` section instead of path key --- Cargo.toml | 15 ++++++++++++++- phf/Cargo.toml | 4 ++-- phf_codegen/Cargo.toml | 4 ++-- phf_codegen/test/Cargo.toml | 9 ++------- phf_generator/Cargo.toml | 2 +- phf_macros/Cargo.toml | 6 +++--- 6 files changed, 24 insertions(+), 16 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 13b2b7fb..12896add 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,2 +1,15 @@ [workspace] -members = ["phf", "phf_codegen", "phf_codegen/test", "phf_generator", "phf_macros", "phf_shared"] +members = [ + "phf", + "phf_codegen", + "phf_codegen/test", + "phf_generator", + "phf_macros", + "phf_shared" +] + +[patch.crates-io] +phf = { path = "phf" } +phf_generator = { path = "./phf_generator" } +phf_macros = { path = "./phf_macros" } +phf_shared = { path = "./phf_shared" } diff --git a/phf/Cargo.toml b/phf/Cargo.toml index b56b99e9..8da827df 100644 --- a/phf/Cargo.toml +++ b/phf/Cargo.toml @@ -22,10 +22,10 @@ macros = [ ] [dependencies] -phf_shared = { version = "0.8.0", default-features = false, path = "../phf_shared" } +phf_shared = { version = "0.8.0", default-features = false } proc-macro-hack = { version = "0.5.4", optional = true } -phf_macros = { version = "0.8.0", optional = true, path = "../phf_macros" } +phf_macros = { version = "0.8.0", optional = true } [package.metadata.docs.rs] features = ["macros", ] diff --git a/phf_codegen/Cargo.toml b/phf_codegen/Cargo.toml index b5438c5d..d7f20cbe 100644 --- a/phf_codegen/Cargo.toml +++ b/phf_codegen/Cargo.toml @@ -8,5 +8,5 @@ repository = "https://github.com/sfackler/rust-phf" edition = "2018" [dependencies] -phf_generator = { version = "0.8.0", path = "../phf_generator" } -phf_shared = { version = "0.8.0", path = "../phf_shared" } +phf_generator = "0.8.0" +phf_shared = "0.8.0" diff --git a/phf_codegen/test/Cargo.toml b/phf_codegen/test/Cargo.toml index 492c37c7..c8acbbd6 100644 --- a/phf_codegen/test/Cargo.toml +++ b/phf_codegen/test/Cargo.toml @@ -6,14 +6,9 @@ build = "build.rs" edition = "2018" [dependencies] +phf = { version = "0.8", features = ["unicase"] } unicase = "2.4.0" [build-dependencies] +phf_codegen = "0.8" unicase = "2.4.0" - -[build-dependencies.phf_codegen] -path = ".." - -[dependencies.phf] -path = "../../phf" -features = ["unicase"] diff --git a/phf_generator/Cargo.toml b/phf_generator/Cargo.toml index 023befb0..96c93047 100644 --- a/phf_generator/Cargo.toml +++ b/phf_generator/Cargo.toml @@ -9,7 +9,7 @@ edition = "2018" [dependencies] rand = { version = "0.8", features = ["small_rng"] } -phf_shared = { version = "0.8.0", path = "../phf_shared", default-features = false } +phf_shared = { version = "0.8.0", default-features = false } # for stable black_box() criterion = { version = "0.3", optional = true } diff --git a/phf_macros/Cargo.toml b/phf_macros/Cargo.toml index cf6c2a00..ec320304 100644 --- a/phf_macros/Cargo.toml +++ b/phf_macros/Cargo.toml @@ -16,10 +16,10 @@ quote = "1" proc-macro2 = "1" proc-macro-hack = "0.5.4" -phf_generator = { version = "0.8.0", path = "../phf_generator" } -phf_shared = { version = "0.8.0", path = "../phf_shared", default-features = false } +phf_generator = "0.8.0" +phf_shared = { version = "0.8.0", default-features = false } [dev-dependencies] trybuild = "1.0" -phf = { version = "0.8", path = "../phf", features = ["macros", "unicase"] } +phf = { version = "0.8", features = ["macros", "unicase"] } unicase = "2.4.0"