You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reanalyze: fix reactive invalidation on refs-only changes
When transitive mode is off, dead-value reporting depends on hasRefBelow, which depends on value_refs_from (cross-file refs).
Fix ReactiveSolver so per-file issues are recomputed when value_refs_from changes, not only when dead_decls_by_file changes. This prevents stale warnings in long-lived reanalyze-server sessions.
Also add -transitive/-no-transitive CLI overrides (overriding rescript.json) and document/regenerate the checked-in non-transitive reactive pipeline mermaid diagram.
Signed-off-by: Cristiano Calcagno <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@
20
20
21
21
#### :bug: Bug fix
22
22
23
+
- 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
See [ARCHITECTURE.md](ARCHITECTURE.md) for details on the analysis pipeline.
70
72
73
+
### Regenerating the checked-in reactive pipeline diagram
74
+
75
+
`analysis/reanalyze/diagrams/reactive-pipeline-full.mmd` is generated from the live reactive graph printer (`Reactive.to_mermaid()`), and **we check in the non-transitive (`-no-transitive`) variant** because that is where cross-file `hasRefBelow` suppression is relevant (and where reactive invalidation bugs are easiest to spot).
76
+
77
+
To regenerate it:
78
+
79
+
```bash
80
+
# Run from any ReScript project (so -config works), then capture stderr:
class decl_refs.with_type_refs_join,decl_refs.combined_join,decl_refs.type_decl_refs_join,liveness.external_type_refs_join,type_deps.impl_needing_path2_join,decl_refs.with_value_refs_join,solver.live_decls_join,type_deps.impl_to_intf_refs_join,decl_refs.value_decl_refs_join,liveness.annotated_roots_join,solver.dead_decls_join,solver.dead_module_issues_join,solver.dead_modules_join,exc_refs.resolved_refs_join,solver.incorrect_dead_decls_join,type_deps.impl_to_intf_refs_path2_join,liveness.external_value_refs_join,type_deps.intf_to_impl_refs_joinjoinClass
181
+
class decl_refs.with_type_refs_join,decl_refs.combined_join,decl_refs.type_decl_refs_join,liveness.external_type_refs_join,solver.issues_by_file_join,type_deps.impl_needing_path2_join,decl_refs.with_value_refs_join,solver.live_decls_join,type_deps.impl_to_intf_refs_join,decl_refs.value_decl_refs_join,liveness.annotated_roots_join,solver.dead_decls_join,solver.dead_module_issues_join,exc_refs.resolved_refs_join,solver.incorrect_dead_decls_join,type_deps.impl_to_intf_refs_path2_join,liveness.external_value_refs_join,type_deps.intf_to_impl_refs_joinjoinClass
184
182
class type_deps.u1_union,type_deps.u2_union,liveness.type_refs_from_union,liveness.all_roots_union,liveness.externally_referenced_union,type_deps.combined_refs_to_union,liveness.value_refs_from_unionunionClass
0 commit comments