Skip to content

Conversation

nojaf
Copy link
Member

@nojaf nojaf commented Sep 15, 2025

Fixes #7785

Copy link

pkg-pr-new bot commented Sep 15, 2025

Open in StackBlitz

rescript

npm i https://pkg.pr.new/rescript-lang/rescript@7890

@rescript/darwin-arm64

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

@rescript/darwin-x64

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

@rescript/linux-arm64

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

@rescript/linux-x64

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

@rescript/runtime

npm i https://pkg.pr.new/rescript-lang/rescript/@rescript/runtime@7890

@rescript/win32-x64

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

commit: 413dcff

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

👍 LGTM, but would be great if someone else could review, too.

@cknitt
Copy link
Member

cknitt commented Sep 26, 2025

@codex review

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.

ℹ️ 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 👍.

Comment on lines +191 to +195
Ok(path) => {
cache.insert(cache_key, Some(path.clone()));
}
Err(_) => {
cache.insert(cache_key, None);

Choose a reason for hiding this comment

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

[P1] Avoid caching missing packages without invalidation

The new global cache records both successful paths and None for failures. Once a lookup stores None, subsequent calls immediately return the cached error without touching the filesystem. Because the cache is never cleared (reset_try_package_path_cache is unused), running rewatch while node_modules are temporarily incomplete—e.g. before or during an install—causes the tool to keep failing to resolve that package until the process is restarted. Previously, the helper retried on each call and would succeed after installation. Consider either invalidating the cache when dependencies change or skipping negative caching.

Useful? React with 👍 / 👎.

@nojaf
Copy link
Member Author

nojaf commented Sep 26, 2025

Superseded by #7896

@nojaf nojaf closed this Sep 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Perf: improve ppx package resolution

2 participants