Commit a97ad698 authored by Ian Jackson's avatar Ian Jackson
Browse files

derive_builder: Use git dep everywhere, rather than cargo patch

The `[patch]` approach causes the tree not to build when used as a
dependency, unless the `[patch]` is replicated into the depending
project.

Instead, replace our `derive_builer =` dependencies with a reference
to a specific git commit:

  perl -i~ -pe 'next unless m/^derive_builder/; s#"(0\.11\.2)"#{ version = "$1", git = "https://github.com/ijackson/rust-derive-builder", rev = "ba0c1a5311bd9f93ddf5f5b8ec2a5f6f03b22fbe" }#' crates/*/Cargo.toml

Note that the commitid has changed.  This is because derive_builder is
in fact a workspace of 4 crates.  3 of them are of interest to arti
itself (the 4th exists only for testing).  So the same "add git
revision" treatment had to be done to the `derive_builder` and
`derive_builder_macro` crates.  Each dependency edge involves a new
commit in the derive_builder workspace, since we can't create a git
commit containing its own commitid.  (We want to use commits, rather
than a branch, so that what we are depending on is actually properly
defined, and not subject to the whims of my personal github
namespace.)

There are no actual code changes in derive_builder.
parent 5484bcc2
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -880,7 +880,7 @@ dependencies = [
[[package]]
[[package]]
name = "derive_builder"
name = "derive_builder"
version = "0.11.2"
version = "0.11.2"
source = "git+https://github.com/ijackson/rust-derive-builder?rev=4516209ce98f6506bf729aa7cdbced97747f7dd1#4516209ce98f6506bf729aa7cdbced97747f7dd1"
source = "git+https://github.com/ijackson/rust-derive-builder?rev=ba0c1a5311bd9f93ddf5f5b8ec2a5f6f03b22fbe#ba0c1a5311bd9f93ddf5f5b8ec2a5f6f03b22fbe"
dependencies = [
dependencies = [
 "derive_builder_macro",
 "derive_builder_macro",
]
]
@@ -899,7 +899,7 @@ dependencies = [
[[package]]
[[package]]
name = "derive_builder_macro"
name = "derive_builder_macro"
version = "0.11.2"
version = "0.11.2"
source = "git+https://github.com/ijackson/rust-derive-builder?rev=4516209ce98f6506bf729aa7cdbced97747f7dd1#4516209ce98f6506bf729aa7cdbced97747f7dd1"
source = "git+https://github.com/ijackson/rust-derive-builder?rev=a69d5eee830bddd5ff9b146b51e27580b1a7b6b0#a69d5eee830bddd5ff9b146b51e27580b1a7b6b0"
dependencies = [
dependencies = [
 "derive_builder_core",
 "derive_builder_core",
 "syn",
 "syn",
+0 −8
Original line number Original line Diff line number Diff line
@@ -61,11 +61,3 @@ codegen-units = 1
# Optimize for size.  [Actually this is even smaller than 'z' on rust
# Optimize for size.  [Actually this is even smaller than 'z' on rust
# 1.56.  It saves about 11% download size over the default value of '3'.]
# 1.56.  It saves about 11% download size over the default value of '3'.]
opt-level = 's'
opt-level = 's'

[patch.crates-io.derive_builder]
git = "https://github.com/ijackson/rust-derive-builder"
rev = "4516209ce98f6506bf729aa7cdbced97747f7dd1"

[patch.crates-io.derive_builder_core]
git = "https://github.com/ijackson/rust-derive-builder"
rev = "4516209ce98f6506bf729aa7cdbced97747f7dd1"
+1 −1
Original line number Original line Diff line number Diff line
@@ -44,7 +44,7 @@ tor-proto = { path = "../tor-proto", version = "0.2.0" }
tor-rtcompat = { path = "../tor-rtcompat", version = "0.2.0" }
tor-rtcompat = { path = "../tor-rtcompat", version = "0.2.0" }


humantime-serde = "1.1.1"
humantime-serde = "1.1.1"
derive_builder = "0.11.2"
derive_builder = { version = "0.11.2", git = "https://github.com/ijackson/rust-derive-builder", rev = "ba0c1a5311bd9f93ddf5f5b8ec2a5f6f03b22fbe" }
derive_more = "0.99"
derive_more = "0.99"
directories = "4"
directories = "4"
educe = "0.4.6"
educe = "0.4.6"
+1 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,7 @@ serde = { version = "1.0.103", features = ["derive"] }
toml = "0.5"
toml = "0.5"
regex = { version = "1", default-features = false, features = ["std"] }
regex = { version = "1", default-features = false, features = ["std"] }
thiserror = "1"
thiserror = "1"
derive_builder = "0.11.2"
derive_builder = { version = "0.11.2", git = "https://github.com/ijackson/rust-derive-builder", rev = "ba0c1a5311bd9f93ddf5f5b8ec2a5f6f03b22fbe" }


[dev-dependencies]
[dev-dependencies]
tempfile = "3"
tempfile = "3"
+1 −1
Original line number Original line Diff line number Diff line
@@ -34,7 +34,7 @@ anyhow = "1.0.23"
async-ctrlc = { version = "1.2.0", optional = true }
async-ctrlc = { version = "1.2.0", optional = true }
config = { version = "0.12.0", default-features = false }
config = { version = "0.12.0", default-features = false }
cfg-if = "1.0.0"
cfg-if = "1.0.0"
derive_builder = "0.11"
derive_builder = { version = "0.11", git = "https://github.com/ijackson/rust-derive-builder", rev = "ba0c1a5311bd9f93ddf5f5b8ec2a5f6f03b22fbe" }
futures = "0.3.14"
futures = "0.3.14"
tracing = "0.1.18"
tracing = "0.1.18"
notify = "4.0"
notify = "4.0"
Loading