Skip to content

Commit 5010fbb

Browse files
committed
Rewatch: do not warn about "reanalyze" config field (#8181)
1 parent f51ddc2 commit 5010fbb

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
- Reanalyze: fix reactive/server stale results when cross-file references change without changing dead declarations (non-transitive mode). https://github.com/rescript-lang/rescript/pull/8173
2424
- Add duplicate package detection to rewatch. https://github.com/rescript-lang/rescript/pull/8180
25+
- Rewatch: do not warn about "reanalyze" config field. https://github.com/rescript-lang/rescript/pull/8181
2526

2627
#### :memo: Documentation
2728

rewatch/CompilerConfigurationSpec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This document contains a list of all bsconfig parameters with remarks, and wheth
3030
| external-stdlib | string | | [_] |
3131
| bs-external-includes | array of string | | [_] |
3232
| suffix | Suffix | | [x] |
33-
| reanalyze | Reanalyze | | [_] |
33+
| reanalyze | Reanalyze | Reanalyze config; ignored by rewatch | [x] |
3434
| experimental-features | ExperimentalFeatures | | [x] |
3535
| editor | object | VS Code tooling only; ignored by rewatch | [x] |
3636

rewatch/src/config.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,9 @@ pub struct Config {
311311
// Used by the VS Code extension; ignored by rewatch but should not emit warnings.
312312
// Payload is not validated here, only in the VS Code extension.
313313
pub editor: Option<serde_json::Value>,
314+
// Used by rescript-tools reanalyze; ignored by rewatch but should not emit warnings.
315+
// Payload is not validated here, only in reanalyze.
316+
pub reanalyze: Option<serde_json::Value>,
314317
// this is a new feature of rewatch, and it's not part of the rescript.json spec
315318
#[serde(rename = "namespace-entry")]
316319
pub namespace_entry: Option<String>,
@@ -720,7 +723,6 @@ impl Config {
720723
"use-stdlib",
721724
"external-stdlib",
722725
"bs-external-includes",
723-
"reanalyze",
724726
];
725727

726728
let top_level = field.split(|c| ['.', '['].contains(&c)).next().unwrap_or(field);
@@ -810,6 +812,7 @@ pub mod tests {
810812
gentype_config: None,
811813
js_post_build: None,
812814
editor: None,
815+
reanalyze: None,
813816
namespace_entry: None,
814817
deprecation_warnings: vec![],
815818
experimental_features: None,

0 commit comments

Comments
 (0)