From 7357835058be7b0f157a2d5413d90fc13e8e911b Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Tue, 6 Feb 2024 10:51:09 +1100 Subject: [PATCH] chore: use local pact_models The `pact_models` dependency underpins a number of the other packages within the workspace, and the `pact-plugin-driver` package external to this workspace. This committee ensures the local `pact_models` library is consistently used during development by: 1. Using the `path = "..."` for packages within the workspace; and, 2. Using a `patch` in `Cargo.toml` to override transitive dependencies (such as the one that comes from `pact-plugin-driver`). Signed-off-by: JP-Ellis --- compatibility-suite/Cargo.lock | 8 ++-- compatibility-suite/Cargo.toml | 5 ++- rust/Cargo.lock | 57 +++++----------------------- rust/Cargo.toml | 1 + rust/pact_cli/Cargo.toml | 2 +- rust/pact_consumer/Cargo.toml | 2 +- rust/pact_ffi/Cargo.toml | 2 +- rust/pact_matching/Cargo.toml | 2 +- rust/pact_mock_server/Cargo.toml | 2 +- rust/pact_mock_server_cli/Cargo.toml | 2 +- rust/pact_verifier/Cargo.toml | 2 +- rust/pact_verifier_cli/Cargo.toml | 2 +- rust/pact_wasm/Cargo.toml | 2 +- 13 files changed, 26 insertions(+), 63 deletions(-) diff --git a/compatibility-suite/Cargo.lock b/compatibility-suite/Cargo.lock index ed7a24e3f..8f8f3df82 100644 --- a/compatibility-suite/Cargo.lock +++ b/compatibility-suite/Cargo.lock @@ -1892,9 +1892,9 @@ checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" [[package]] name = "pact-plugin-driver" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3252202260ca741ad738ae52b09b647c3dc65ba60ea4c09a58da749e0f023d3" +checksum = "26e63ffe3c61b92258856a9b0558d1526dfc4313a84280a452eec684513251b2" dependencies = [ "anyhow", "async-trait", @@ -2024,9 +2024,7 @@ dependencies = [ [[package]] name = "pact_models" -version = "1.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e7e92fb5f4707c1b69b0338f09c0b263c7b84ce9fa0e1614cf0665585d8ac7" +version = "1.1.18" dependencies = [ "anyhow", "ariadne", diff --git a/compatibility-suite/Cargo.toml b/compatibility-suite/Cargo.toml index 0632e6c30..8492bc926 100644 --- a/compatibility-suite/Cargo.toml +++ b/compatibility-suite/Cargo.toml @@ -13,7 +13,7 @@ futures = "0.3.29" itertools = "0.11.0" lazy_static = "1.4.0" maplit = "1.0.2" -pact_models = "~1.1.17" +pact_models = { version = "~1.1.17", path = "../rust/pact_models" } pact_matching = { version = "1.1.9", path = "../rust/pact_matching" } pact_mock_server = { version = "1.2.4", path = "../rust/pact_mock_server" } pact_verifier = { version = "1.0.5", path = "../rust/pact_verifier" } @@ -30,6 +30,9 @@ tracing = "0.1.40" tracing-subscriber = { version = "0.3.17", features = ["env-filter", "tracing-log", "fmt"] } uuid = { version = "1.5.0", features = ["v4"] } +[patch.crates-io] +pact_models = { path = "../rust/pact_models" } + [[test]] name = "v1_consumer" harness = false diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 814c6848d..432b2c73c 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1754,7 +1754,7 @@ dependencies = [ "maplit", "md5", "os_info", - "pact_models 1.1.17", + "pact_models", "prost", "prost-types", "regex", @@ -1787,7 +1787,7 @@ dependencies = [ "log", "maplit", "pact_matching", - "pact_models 1.1.17", + "pact_models", "serde", "serde_json", "simplelog", @@ -1809,7 +1809,7 @@ dependencies = [ "pact-plugin-driver", "pact_matching", "pact_mock_server", - "pact_models 1.1.17", + "pact_models", "pretty_assertions", "quickcheck", "rand", @@ -1853,7 +1853,7 @@ dependencies = [ "pact-plugin-driver", "pact_matching", "pact_mock_server", - "pact_models 1.1.17", + "pact_models", "pact_verifier", "panic-message", "pretty_assertions", @@ -1907,7 +1907,7 @@ dependencies = [ "ntest", "onig", "pact-plugin-driver", - "pact_models 1.1.17", + "pact_models", "pretty_assertions", "quickcheck", "rand", @@ -1943,7 +1943,7 @@ dependencies = [ "maplit", "pact-plugin-driver", "pact_matching", - "pact_models 1.1.17", + "pact_models", "quickcheck", "reqwest", "rustls", @@ -1979,7 +1979,7 @@ dependencies = [ "maplit", "pact_matching", "pact_mock_server", - "pact_models 1.1.17", + "pact_models", "quickcheck", "rand", "regex", @@ -1997,45 +1997,6 @@ dependencies = [ "webmachine-rust", ] -[[package]] -name = "pact_models" -version = "1.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0e7e92fb5f4707c1b69b0338f09c0b263c7b84ce9fa0e1614cf0665585d8ac7" -dependencies = [ - "anyhow", - "ariadne", - "base64", - "bytes", - "chrono", - "chrono-tz", - "fs2", - "gregorian", - "hashers", - "hex", - "indextree", - "itertools 0.10.5", - "lazy_static", - "lenient_semver", - "logos", - "maplit", - "mime", - "nom", - "onig", - "parse-zoneinfo", - "rand", - "rand_regex", - "regex", - "regex-syntax 0.6.29", - "reqwest", - "semver", - "serde", - "serde_json", - "sxd-document", - "tracing", - "uuid", -] - [[package]] name = "pact_models" version = "1.1.18" @@ -2106,7 +2067,7 @@ dependencies = [ "pact-plugin-driver", "pact_consumer", "pact_matching", - "pact_models 1.1.17", + "pact_models", "pretty_assertions", "quickcheck", "regex", @@ -2136,7 +2097,7 @@ dependencies = [ "junit-report", "log", "maplit", - "pact_models 1.1.17", + "pact_models", "pact_verifier", "regex", "reqwest", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index e9f97fbf1..0376c2a3a 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -9,3 +9,4 @@ resolver = "2" [patch.crates-io] onig = { git = "https://github.com/rust-onig/rust-onig", default-features = false } +pact_models = { path = "pact_models" } \ No newline at end of file diff --git a/rust/pact_cli/Cargo.toml b/rust/pact_cli/Cargo.toml index 2f890ce14..86479a81a 100644 --- a/rust/pact_cli/Cargo.toml +++ b/rust/pact_cli/Cargo.toml @@ -17,7 +17,7 @@ exclude = [ clap = "2.31.2" serde_json = "1.0" serde = "1.0" -pact_models = "~1.1.17" +pact_models = { version = "~1.1.17", path = "../pact_models" } pact_matching = { version = "~1.1.9", path = "../pact_matching" } anyhow = "1.0.40" log = "0.4.14" diff --git a/rust/pact_consumer/Cargo.toml b/rust/pact_consumer/Cargo.toml index bbc04fecc..79372f645 100644 --- a/rust/pact_consumer/Cargo.toml +++ b/rust/pact_consumer/Cargo.toml @@ -31,7 +31,7 @@ lazy_static = "1.4.0" maplit = "1.0.2" pact_matching = { version = "~1.1.9", path = "../pact_matching", default-features = false } pact_mock_server = { version = "~1.2.4", path = "../pact_mock_server", default-features = false } -pact_models = { version = "~1.1.17", default-features = false } +pact_models = { version = "~1.1.17", path = "../pact_models", default-features = false } pact-plugin-driver = { version = "~0.5.1", optional = true, default-features = false } regex = "1.10.2" serde_json = "1.0.108" diff --git a/rust/pact_ffi/Cargo.toml b/rust/pact_ffi/Cargo.toml index 5761a152b..b5c775879 100644 --- a/rust/pact_ffi/Cargo.toml +++ b/rust/pact_ffi/Cargo.toml @@ -32,7 +32,7 @@ multipart = { version = "0.18.0", default-features = false, features = ["client" onig = { version = "6.4.0", default-features = false } pact_matching = { version = "~1.1.9", path = "../pact_matching" } pact_mock_server = { version = "~1.2.4", path = "../pact_mock_server" } -pact_models = "~1.1.17" +pact_models = { version = "~1.1.17", path = "../pact_models" } pact-plugin-driver = { version = "~0.5.1" } pact_verifier = { version = "~1.0.5", path = "../pact_verifier" } panic-message = "0.3.0" diff --git a/rust/pact_matching/Cargo.toml b/rust/pact_matching/Cargo.toml index fd3242e2e..8cac5ed48 100644 --- a/rust/pact_matching/Cargo.toml +++ b/rust/pact_matching/Cargo.toml @@ -40,7 +40,7 @@ mime = "0.3.17" multer = { version = "2.1.0", features = ["all"], optional = true } nom = "7.1.3" onig = { version = "6.4.0", default-features = false } -pact_models = { version = "~1.1.17", default-features = false } +pact_models = { version = "~1.1.17", path = "../pact_models", default-features = false } pact-plugin-driver = { version = "~0.5.1", optional = true, default-features = false } rand = "0.8.5" semver = "1.0.17" diff --git a/rust/pact_mock_server/Cargo.toml b/rust/pact_mock_server/Cargo.toml index 6c0fbc858..7c0b0acb8 100644 --- a/rust/pact_mock_server/Cargo.toml +++ b/rust/pact_mock_server/Cargo.toml @@ -31,7 +31,7 @@ itertools = "0.12.0" lazy_static = "1.4.0" maplit = "1.0.2" pact_matching = { version = "~1.1.9", path = "../pact_matching", default-features = false } -pact_models = { version = "~1.1.17", default-features = false } +pact_models = { version = "~1.1.17", path = "../pact_models", default-features = false } pact-plugin-driver = { version = "~0.5.1", optional = true, default-features = false } rustls = { version = "~0.21.10", optional = true } rustls-pemfile = { version = "1.0.4", optional = true } diff --git a/rust/pact_mock_server_cli/Cargo.toml b/rust/pact_mock_server_cli/Cargo.toml index 34263e245..13f712c28 100644 --- a/rust/pact_mock_server_cli/Cargo.toml +++ b/rust/pact_mock_server_cli/Cargo.toml @@ -33,7 +33,7 @@ log = "0.4.20" lazy_static = "1.4.0" pact_matching = { version = "~1.1.9", path = "../pact_matching", default-features = false } pact_mock_server = { version = "~1.2.4", path = "../pact_mock_server", default-features = false } -pact_models = { version = "~1.1.17", default-features = false } +pact_models = { version = "~1.1.17", path = "../pact_models", default-features = false } rand = "0.8.5" regex = "1.10.2" reqwest = { version = "0.11.23", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } diff --git a/rust/pact_verifier/Cargo.toml b/rust/pact_verifier/Cargo.toml index 799684ac5..842114ce2 100644 --- a/rust/pact_verifier/Cargo.toml +++ b/rust/pact_verifier/Cargo.toml @@ -36,7 +36,7 @@ lazy_static = "1.4.0" maplit = "1.0.2" mime = "0.3.17" pact_matching = { version = "~1.1.9", path = "../pact_matching", default-features = false } -pact_models = { version = "~1.1.17", default-features = false } +pact_models = { version = "~1.1.17", path = "../pact_models", default-features = false } pact-plugin-driver = { version = "~0.5.1", optional = true, default-features = false } regex = "1.10.2" serde = "1.0.193" diff --git a/rust/pact_verifier_cli/Cargo.toml b/rust/pact_verifier_cli/Cargo.toml index 7421147df..2783cd6be 100644 --- a/rust/pact_verifier_cli/Cargo.toml +++ b/rust/pact_verifier_cli/Cargo.toml @@ -29,7 +29,7 @@ env_logger = "0.10.1" junit-report = { version = "0.8.3", optional = true } log = "0.4.20" maplit = "1.0.2" -pact_models = { version = "~1.1.17", default-features = false } +pact_models = { version = "~1.1.17", path = "../pact_models", default-features = false } pact_verifier = { version = "~1.0.5", path = "../pact_verifier", default-features = false } regex = "1.10.2" reqwest = { version = "0.11.23", default-features = false, features = ["rustls-tls-native-roots", "blocking", "json"] } diff --git a/rust/pact_wasm/Cargo.toml b/rust/pact_wasm/Cargo.toml index 8996849c6..9ff72e465 100644 --- a/rust/pact_wasm/Cargo.toml +++ b/rust/pact_wasm/Cargo.toml @@ -18,7 +18,7 @@ exclude = [ crate-type = ["cdylib", "rlib"] [dependencies] -pact_models = "~1.1.17" +pact_models = { version = "~1.1.17", path = "../pact_models" } wasm-bindgen = "0.2.79" console_error_panic_hook = "0.1.7" console_log = { version = "0.2.0", features = ["color"] }