Skip to content

Reanalyze server: invalidate cache on config change#8262

Open
cristianoc wants to merge 1 commit intomasterfrom
reanalyze-server-config-invalidation
Open

Reanalyze server: invalidate cache on config change#8262
cristianoc wants to merge 1 commit intomasterfrom
reanalyze-server-config-invalidation

Conversation

@cristianoc
Copy link
Collaborator

Summary

  • Re-read rescript.json before each server request and compare with a saved config snapshot
  • When the reanalyze config changes (suppress, unsuppress, analysis mode, transitive), recreate the entire reactive pipeline from scratch
  • Add RunConfig.snapshot/reset/equal_snapshot for config change detection
  • Extract reactive_pipeline type and create_reactive_pipeline helper in the server

Closes #8266

Test plan

  • Existing run_scenario_config_change in test-reactive-server.sh validates this end-to-end
  • bash tests/analysis_tests/tests-reanalyze/deadcode/test-reactive-server.sh --iterations 1 passes

🤖 Generated with Claude Code

@cristianoc cristianoc force-pushed the reanalyze-server-config-invalidation branch from f895bc6 to 98b7a21 Compare February 27, 2026 11:12
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 98b7a21c8e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript@8262

@rescript/darwin-arm64

npm i https://pkg.pr.new/@rescript/darwin-arm64@8262

@rescript/darwin-x64

npm i https://pkg.pr.new/@rescript/darwin-x64@8262

@rescript/linux-arm64

npm i https://pkg.pr.new/@rescript/linux-arm64@8262

@rescript/linux-x64

npm i https://pkg.pr.new/@rescript/linux-x64@8262

@rescript/runtime

npm i https://pkg.pr.new/@rescript/runtime@8262

@rescript/win32-x64

npm i https://pkg.pr.new/@rescript/win32-x64@8262

commit: b4800af

@fhammerschmidt
Copy link
Member

I guess the issue was in the wrong repo then, I'll move it over.

Re-read rescript.json before each server request and recreate the
reactive pipeline from scratch when the reanalyze config changes
(suppress, unsuppress, analysis mode, transitive).

Closes rescript-lang/rescript-vscode#1180

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cristianoc cristianoc force-pushed the reanalyze-server-config-invalidation branch from 98b7a21 to bef511d Compare February 28, 2026 07:49
@cristianoc cristianoc requested review from fhammerschmidt and removed request for fhammerschmidt February 28, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trigger (full) dce run after reanalyze config is changed in rescript.json

2 participants