diff --git a/CHANGELOG.md b/CHANGELOG.md index 6ddafb0a0d..f254f4d32e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - 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 - Add duplicate package detection to rewatch. https://github.com/rescript-lang/rescript/pull/8180 +- Rewatch: do not warn about "reanalyze" config field. https://github.com/rescript-lang/rescript/pull/8181 #### :memo: Documentation diff --git a/rewatch/CompilerConfigurationSpec.md b/rewatch/CompilerConfigurationSpec.md index 6b32d4d96a..f3ec4b0889 100644 --- a/rewatch/CompilerConfigurationSpec.md +++ b/rewatch/CompilerConfigurationSpec.md @@ -28,7 +28,7 @@ This document contains a list of all bsconfig parameters with remarks, and wheth | entries | array of Target-Item | | [_] | | bs-external-includes | array of string | | [_] | | suffix | Suffix | | [x] | -| reanalyze | Reanalyze | | [_] | +| reanalyze | Reanalyze | Reanalyze config; ignored by rewatch | [x] | | experimental-features | ExperimentalFeatures | | [x] | | editor | object | VS Code tooling only; ignored by rewatch | [x] | diff --git a/rewatch/src/config.rs b/rewatch/src/config.rs index 55ea4baf15..0ac75ba6e5 100644 --- a/rewatch/src/config.rs +++ b/rewatch/src/config.rs @@ -311,6 +311,9 @@ pub struct Config { // Used by the VS Code extension; ignored by rewatch but should not emit warnings. // Payload is not validated here, only in the VS Code extension. pub editor: Option, + // Used by rescript-tools reanalyze; ignored by rewatch but should not emit warnings. + // Payload is not validated here, only in reanalyze. + pub reanalyze: Option, // this is a new feature of rewatch, and it's not part of the rescript.json spec #[serde(rename = "namespace-entry")] pub namespace_entry: Option, @@ -718,7 +721,6 @@ impl Config { "pp-flags", "entries", "bs-external-includes", - "reanalyze", ]; let top_level = field.split(|c| ['.', '['].contains(&c)).next().unwrap_or(field); @@ -808,6 +810,7 @@ pub mod tests { gentype_config: None, js_post_build: None, editor: None, + reanalyze: None, namespace_entry: None, deprecation_warnings: vec![], experimental_features: None,