Skip to content

Commit

Permalink
fix: schemars 0.8.18 compatibility
Browse files Browse the repository at this point in the history
backport of #9676

Co-authored-by: Hankung <73242257+Hankung7183@users.noreply.github.com>
  • Loading branch information
FabianLars and Hankung7183 committed May 6, 2024
1 parent b8fd8e1 commit 86326e4
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .changes/schemars-comp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
tauri-utils: "patch:bug"
---

Fixes `schemars` compilation issue.
16 changes: 8 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/tauri-config-schema/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ publish = false
tauri-utils = { version = "1.0.0", features = [
"schema",
], path = "../tauri-utils" }
schemars = { version = "0.8", features = ["url", "preserve_order"] }
schemars = { version = "0.8.18", features = ["url", "preserve_order"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
url = { version = "2.3", features = ["serde"] }
1 change: 0 additions & 1 deletion core/tauri-config-schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
},
"version": {
"description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.",
"default": null,
"type": [
"string",
"null"
Expand Down
2 changes: 1 addition & 1 deletion core/tauri-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ html5ever = "0.26"
kuchiki = { package = "kuchikiki", version = "0.8" }
proc-macro2 = { version = "1", optional = true }
quote = { version = "1", optional = true }
schemars = { version = "0.8", features = [ "url" ], optional = true }
schemars = { version = "0.8.18", features = [ "url" ], optional = true }
serde_with = "3"
aes-gcm = { version = "0.10", optional = true }
getrandom = { version = "0.2", optional = true, features = [ "std" ] }
Expand Down
14 changes: 4 additions & 10 deletions core/tauri-utils/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,19 +166,13 @@ impl schemars::JsonSchema for BundleTarget {
..Default::default()
}
.into(),
schemars::_private::apply_metadata(
schemars::_private::metadata::add_description(
gen.subschema_for::<Vec<BundleType>>(),
schemars::schema::Metadata {
description: Some("A list of bundle targets.".to_owned()),
..Default::default()
},
"A list of bundle targets.",
),
schemars::_private::apply_metadata(
schemars::_private::metadata::add_description(
gen.subschema_for::<BundleType>(),
schemars::schema::Metadata {
description: Some("A single bundle target.".to_owned()),
..Default::default()
},
"A single bundle target.",
),
];

Expand Down
16 changes: 8 additions & 8 deletions tooling/cli/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tooling/cli/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
},
"version": {
"description": "App version. It is a semver version number or a path to a `package.json` file containing the `version` field. If removed the version number from `Cargo.toml` is used.",
"default": null,
"type": [
"string",
"null"
Expand Down

0 comments on commit 86326e4

Please sign in to comment.