Skip to content

Commit 90715f7

Browse files
committed
refactor(schemas): Pull out cargo-util-schemas crate
Fixes #12801
1 parent ba3b592 commit 90715f7

33 files changed

+89
-47
lines changed

Cargo.lock

Lines changed: 15 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.4" }
3030
cargo-test-macro = { path = "crates/cargo-test-macro" }
3131
cargo-test-support = { path = "crates/cargo-test-support" }
3232
cargo-util = { version = "0.2.6", path = "crates/cargo-util" }
33+
cargo-util-schemas = { version = "0.1.0", path = "crates/cargo-util-schemas" }
3334
cargo_metadata = "0.18.1"
3435
clap = "4.4.10"
3536
color-print = "0.3.5"
@@ -144,6 +145,7 @@ base64.workspace = true
144145
bytesize.workspace = true
145146
cargo-credential.workspace = true
146147
cargo-platform.workspace = true
148+
cargo-util-schemas.workspace = true
147149
cargo-util.workspace = true
148150
clap = { workspace = true, features = ["wrap_help"] }
149151
color-print.workspace = true
@@ -183,7 +185,6 @@ rustfix.workspace = true
183185
semver.workspace = true
184186
serde = { workspace = true, features = ["derive"] }
185187
serde-untagged.workspace = true
186-
serde-value.workspace = true
187188
serde_ignored.workspace = true
188189
serde_json = { workspace = true, features = ["raw_value"] }
189190
sha1.workspace = true
@@ -199,7 +200,6 @@ tracing.workspace = true
199200
tracing-subscriber.workspace = true
200201
unicase.workspace = true
201202
unicode-width.workspace = true
202-
unicode-xid.workspace = true
203203
url.workspace = true
204204
walkdir.workspace = true
205205

crates/cargo-util-schemas/Cargo.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[package]
2+
name = "cargo-util-schemas"
3+
version = "0.1.0"
4+
rust-version.workspace = true
5+
edition.workspace = true
6+
license.workspace = true
7+
homepage = "https://github.com/rust-lang/cargo"
8+
repository = "https://github.com/rust-lang/cargo"
9+
description = "Deserialization schemas for Cargo"
10+
11+
[dependencies]
12+
anyhow.workspace = true
13+
semver.workspace = true
14+
serde = { workspace = true, features = ["derive"] }
15+
serde-untagged.workspace = true
16+
serde-value.workspace = true
17+
toml.workspace = true
18+
unicode-xid.workspace = true
19+
url.workspace = true
20+
21+
[lints]
22+
workspace = true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE-APACHE

crates/cargo-util-schemas/LICENSE-MIT

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../LICENSE-MIT

src/cargo/util_schemas/core/package_id_spec.rs renamed to crates/cargo-util-schemas/src/core/package_id_spec.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ use semver::Version;
66
use serde::{de, ser};
77
use url::Url;
88

9-
use crate::util_schemas::core::GitReference;
10-
use crate::util_schemas::core::PartialVersion;
11-
use crate::util_schemas::core::SourceKind;
12-
use crate::util_schemas::manifest::PackageName;
9+
use crate::core::GitReference;
10+
use crate::core::PartialVersion;
11+
use crate::core::SourceKind;
12+
use crate::manifest::PackageName;
1313

1414
/// Some or all of the data required to identify a package:
1515
///
File renamed without changes.

0 commit comments

Comments
 (0)