Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion rewatch/CompilerConfigurationSpec.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |

Expand Down
5 changes: 4 additions & 1 deletion rewatch/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<serde_json::Value>,
// Used by rescript-tools reanalyze; ignored by rewatch but should not emit warnings.
// Payload is not validated here, only in reanalyze.
pub reanalyze: Option<serde_json::Value>,
// 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<String>,
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
Loading