Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[workspace-hack] use workspace-dotted format and a patch directive #4197

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .config/hakari.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ hakari-package = "omicron-workspace-hack"
# Format for `workspace-hack = ...` lines in other Cargo.tomls. Requires cargo-hakari 0.9.8 or above.
dep-format-version = "4"

# Output lines as `omicron-workspace-hack.workspace = true`. Requires
# cargo-hakari 0.9.28 or above.
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.
# For more about the new feature resolver, see:
Expand All @@ -27,4 +31,3 @@ exact-versions = true

[traversal-excludes]
workspace-members = ["xtask"]

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,7 @@ nexus-db-queries = { path = "nexus/db-queries" }
nexus-defaults = { path = "nexus/defaults" }
omicron-certificates = { path = "certificates" }
omicron-passwords = { path = "passwords" }
omicron-workspace-hack = "0.1.0"
nexus-test-interface = { path = "nexus/test-interface" }
nexus-test-utils-macros = { path = "nexus/test-utils-macros" }
nexus-test-utils = { path = "nexus/test-utils" }
Expand Down Expand Up @@ -554,3 +555,10 @@ opt-level = 3
[patch.crates-io.pq-sys]
git = 'https://github.com/oxidecomputer/pq-sys'
branch = "oxide/omicron"

# Using the workspace-hack via this patch directive means that it only applies
# while building within this workspace. If another workspace imports a crate
# from here via a git dependency, it will not have the workspace-hack applied
# to it.
[patch.crates-io.omicron-workspace-hack]
path = "workspace-hack"
2 changes: 1 addition & 1 deletion api_identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ proc-macro = true
proc-macro2.workspace = true
quote.workspace = true
syn.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion bootstore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ zeroize.workspace = true
# utils`. Unfortunately, it doesn't appear possible to put the `pq-sys` dep
# only in `[dev-dependencies]`.
pq-sys = "*"
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
assert_matches.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion bootstrap-agent-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ serde.workspace = true
sled-hardware.workspace = true
slog.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion caboose-util/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ license = "MPL-2.0"
[dependencies]
anyhow.workspace = true
hubtools.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion certificates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ openssl-sys.workspace = true
thiserror.workspace = true

omicron-common.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
omicron-test-utils.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ toml.workspace = true
uuid.workspace = true
parse-display.workspace = true
progenitor.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
camino-tempfile.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crdb-seed/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ omicron-test-utils.workspace = true
ring.workspace = true
slog.workspace = true
tokio.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion ddm-admin-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ tokio.workspace = true

omicron-common.workspace = true
sled-hardware.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[build-dependencies]
anyhow.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion deploy/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ serde.workspace = true
serde_derive.workspace = true
thiserror.workspace = true
toml.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[[bin]]
name = "thing-flinger"
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/omdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ tabled.workspace = true
textwrap.workspace = true
tokio = { workspace = true, features = [ "full" ] }
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
ipnetwork.workspace = true
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/omicron-dev/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ signal-hook-tokio.workspace = true
tokio = { workspace = true, features = [ "full" ] }
tokio-postgres.workspace = true
toml.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
camino-tempfile.workspace = true
Expand Down
6 changes: 0 additions & 6 deletions dev-tools/xtask/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,6 @@ fn cmd_check_workspace_deps() -> Result<()> {
}
}

if name == WORKSPACE_HACK_PACKAGE_NAME {
// Skip over workspace-hack because hakari doesn't yet support
// workspace deps: https://github.com/guppy-rs/guppy/issues/7
continue;
}

non_workspace_dependencies
.entry(name.to_owned())
.or_insert_with(Vec::new)
Expand Down
2 changes: 1 addition & 1 deletion dns-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trust-dns-proto.workspace = true
trust-dns-resolver.workspace = true
trust-dns-server.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion dns-service-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ serde.workspace = true
serde_json.workspace = true
slog.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion dpd-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ipnetwork.workspace = true
http.workspace = true
schemars.workspace = true
rand.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[build-dependencies]
anyhow.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion end-to-end-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ tokio = { workspace = true, features = ["macros", "rt-multi-thread"] }
toml.workspace = true
trust-dns-resolver.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion gateway-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ uuid.workspace = true

gateway-client.workspace = true
gateway-messages.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion gateway-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ serde_json.workspace = true
schemars.workspace = true
slog.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion gateway-test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ slog.workspace = true
sp-sim.workspace = true
tokio.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ tokio-tungstenite.workspace = true
tokio-util.workspace = true
toml.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion illumos-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ zone.workspace = true

# only enabled via the `testing` feature
mockall = { workspace = true, optional = true }
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[target.'cfg(target_os = "illumos")'.dependencies]
opte-ioctl.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion installinator-artifact-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ serde_json.workspace = true
slog.workspace = true
update-engine.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion installinator-artifactd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ uuid.workspace = true

installinator-common.workspace = true
omicron-common.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion installinator-common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ serde_json.workspace = true
serde_with.workspace = true
thiserror.workspace = true
update-engine.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
4 changes: 2 additions & 2 deletions installinator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ toml.workspace = true
tufaceous-lib.workspace = true
update-engine.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
omicron-test-utils.workspace = true
Expand All @@ -57,4 +57,4 @@ tokio-stream.workspace = true
[features]
image-standard = []
image-trampoline = []
rack-topology-single-sled = []
rack-topology-single-sled = []
2 changes: 1 addition & 1 deletion internal-dns-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ omicron-common.workspace = true
slog.workspace = true
tokio.workspace = true
trust-dns-resolver.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion internal-dns/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ thiserror.workspace = true
trust-dns-proto.workspace = true
trust-dns-resolver.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
assert_matches.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion ipcc-key-value/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ omicron-common.workspace = true
serde.workspace = true
thiserror.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
omicron-common = { workspace = true, features = ["testing"] }
Expand Down
2 changes: 1 addition & 1 deletion key-manager/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ slog.workspace = true
thiserror.workspace = true
tokio.workspace = true
zeroize.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

2 changes: 1 addition & 1 deletion nexus-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ serde.workspace = true
serde_json.workspace = true
slog.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion nexus/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ oximeter.workspace = true
oximeter-instruments = { workspace = true, features = ["http-instruments"] }
oximeter-producer.workspace = true
rustls = { workspace = true }
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
async-bb8-diesel.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion nexus/authz-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ quote.workspace = true
serde.workspace = true
serde_tokenstream.workspace = true
syn.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion nexus/db-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ quote.workspace = true
serde.workspace = true
serde_tokenstream.workspace = true
syn = { workspace = true, features = ["extra-traits"] }
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
rustfmt-wrapper.workspace = true
2 changes: 1 addition & 1 deletion nexus/db-model/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ nexus-defaults.workspace = true
nexus-types.workspace = true
omicron-passwords.workspace = true
sled-agent-client.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
2 changes: 1 addition & 1 deletion nexus/db-queries/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ nexus-types.workspace = true
omicron-common.workspace = true
omicron-passwords.workspace = true
oximeter.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
assert_matches.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion nexus/defaults/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ rand.workspace = true
serde_json.workspace = true

omicron-common.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion nexus/test-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ nexus-types.workspace = true
omicron-common.workspace = true
slog.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion nexus/test-utils-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ proc-macro = true
proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = [ "fold", "parsing" ] }
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion nexus/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ tempfile.workspace = true
trust-dns-proto.workspace = true
trust-dns-resolver.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion nexus/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ api_identity.workspace = true
dns-service-client.workspace = true
omicron-common.workspace = true
omicron-passwords.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion oxide-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ thiserror.workspace = true
tokio = { workspace = true, features = [ "net" ] }
trust-dns-resolver.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion oximeter-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ reqwest = { workspace = true, features = ["json", "rustls-tls", "stream"] }
serde.workspace = true
slog.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../workspace-hack" }
omicron-workspace-hack.workspace = true
2 changes: 1 addition & 1 deletion oximeter/collector/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ thiserror.workspace = true
tokio.workspace = true
toml.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
expectorate.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion oximeter/db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ thiserror.workspace = true
tokio = { workspace = true, features = [ "rt-multi-thread", "macros" ] }
usdt.workspace = true
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[dev-dependencies]
itertools.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion oximeter/instruments/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ oximeter.workspace = true
tokio.workspace = true
http = { workspace = true, optional = true }
uuid.workspace = true
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true

[features]
default = ["http-instruments"]
Expand Down
2 changes: 1 addition & 1 deletion oximeter/oximeter-macro-impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ proc-macro = true
proc-macro2.workspace = true
quote.workspace = true
syn = { workspace = true, features = [ "full", "extra-traits" ] }
omicron-workspace-hack = { version = "0.1", path = "../../workspace-hack" }
omicron-workspace-hack.workspace = true
Loading
Loading