analysis refactor: remove global state Shared_types.state#8465
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #8465 +/- ##
==========================================
- Coverage 60.91% 60.91% -0.01%
==========================================
Files 374 374
Lines 54095 54099 +4
==========================================
+ Hits 32953 32955 +2
- Misses 21142 21144 +2
🚀 New features to boost your workflow:
|
rescript
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
|
@codex review |
|
Codex Review: Didn't find any major issues. Breezy! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex can you check if there is at most only one state in existence that we pass through? I guess it is ok to have multiple create_state() because those are all different entry points but that is not easily verifiable from just the diff. |
|
Codex Review: Didn't find any major issues. Another round soon, please! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
ok verified it myself locally, looks good! |
The old global state kept shared mutable caches for: packages by root, URI to root mapping and CMT file cache. That is okay for short CLI calls, but bad for a long-running server because stale cached data can survive across unrelated requests, workspaces, or project changes. A server needs state scoped to the server lifecycle so caches can be isolated and eventually reset/recreated
Shared_types.state; addedShared_types.create_state.Cli/Commands.Cherry-pick of #8425