Skip to content

Commit 0a7f568

Browse files
authored
Rewatch: do not warn about "reanalyze" config field (#8181)
* Rewatch: do not warn about "reanalyze" config field * fix * CHANGELOG
1 parent 384af6e commit 0a7f568

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
@@ -25,6 +25,7 @@
2525

2626
- 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
2727
- Add duplicate package detection to rewatch. https://github.com/rescript-lang/rescript/pull/8180
28+
- Rewatch: do not warn about "reanalyze" config field. https://github.com/rescript-lang/rescript/pull/8181
2829

2930
#### :memo: Documentation
3031

rewatch/CompilerConfigurationSpec.md

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

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>,
@@ -718,7 +721,6 @@ impl Config {
718721
"pp-flags",
719722
"entries",
720723
"bs-external-includes",
721-
"reanalyze",
722724
];
723725

724726
let top_level = field.split(|c| ['.', '['].contains(&c)).next().unwrap_or(field);
@@ -808,6 +810,7 @@ pub mod tests {
808810
gentype_config: None,
809811
js_post_build: None,
810812
editor: None,
813+
reanalyze: None,
811814
namespace_entry: None,
812815
deprecation_warnings: vec![],
813816
experimental_features: None,

0 commit comments

Comments
 (0)