Skip to content

Commit

Permalink
Merge pull request #465 from moonbitlang/update-schema
Browse files Browse the repository at this point in the history
update schema
  • Loading branch information
Yu-zh authored Nov 12, 2024
2 parents e6d64e0 + 19629ff commit 185fb20
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/moonbuild/src/bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ pub fn f() -> Unit {{
},
wbtest_import: None,
test_import: None,
test_import_all: None,
link: None,
warn_list: None,
alert_list: None,
Expand Down Expand Up @@ -190,6 +191,7 @@ pub fn write(config: &Config, base_dir: &Path) {
},
wbtest_import: None,
test_import: None,
test_import_all: None,
link: None,
warn_list: None,
alert_list: None,
Expand Down
2 changes: 2 additions & 0 deletions crates/moonbuild/src/new.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub fn moon_new_exec(
])),
wbtest_import: None,
test_import: None,
test_import_all: None,
link: None,
warn_list: None,
alert_list: None,
Expand Down Expand Up @@ -213,6 +214,7 @@ fn common(
import: None,
wbtest_import: None,
test_import: None,
test_import_all: None,
link: None,
warn_list: None,
alert_list: None,
Expand Down
7 changes: 7 additions & 0 deletions crates/moonbuild/template/pkg.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@
}
]
},
"test-import-all": {
"description": "Whether to import all definitions from the package being tested",
"type": [
"boolean",
"null"
]
},
"warn-list": {
"description": "Warn list setting of the package",
"type": [
Expand Down
6 changes: 6 additions & 0 deletions crates/moonutil/src/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,12 @@ pub struct MoonPkgJSON {
#[schemars(rename = "test-import")]
pub test_import: Option<PkgJSONImport>,

/// Whether to import all definitions from the package being tested
#[serde(skip_serializing_if = "Option::is_none")]
#[serde(alias = "test-import-all")]
#[schemars(rename = "test-import-all")]
pub test_import_all: Option<bool>,

#[serde(skip_serializing_if = "Option::is_none")]
pub link: Option<BoolOrLink>,

Expand Down
7 changes: 7 additions & 0 deletions docs/manual-zh/src/source/pkg_json_schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
}
]
},
"test-import-all": {
"description": "Whether to import all definitions from the package being tested",
"type": [
"boolean",
"null"
]
},
"warn-list": {
"description": "Warn list setting of the package",
"type": [
Expand Down
7 changes: 7 additions & 0 deletions docs/manual/src/source/pkg_json_schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,13 @@
}
]
},
"test-import-all": {
"description": "Whether to import all definitions from the package being tested",
"type": [
"boolean",
"null"
]
},
"warn-list": {
"description": "Warn list setting of the package",
"type": [
Expand Down

0 comments on commit 185fb20

Please sign in to comment.