Skip to content

Avoid caching failed plugin config loads#1768

Merged
webpro merged 2 commits into
webpro-nl:mainfrom
jakeleventhal:codex/do-not-cache-plugin-load-errors
May 28, 2026
Merged

Avoid caching failed plugin config loads#1768
webpro merged 2 commits into
webpro-nl:mainfrom
jakeleventhal:codex/do-not-cache-plugin-load-errors

Conversation

@jakeleventhal

Copy link
Copy Markdown
Contributor

Summary

  • avoid writing plugin config cache entries when resolveConfig loading throws
  • keep failed config loads retried on warm --cache runs instead of masking the error
  • add a regression test covering cold and warm cached CLI runs

Validation

  • pnpm --dir packages/knip build
  • bun test test/plugin-config-load-error.test.ts from packages/knip
  • pnpm --dir packages/knip lint
  • pnpm --dir packages/knip test --smoke
  • Against rip-technologies: rm -rf ./node_modules/.cache/knip && node /Users/jakeleventhal/.codex/worktrees/f505/knip/packages/knip/dist/cli.js --no-progress --cache, then reran the same patched CLI with warm cache; both runs reported the apps/artelo/sls-api/serverless.ts and packages/artelo/integrations/src/codegen.ts load errors instead of the warm cache passing silently.

@pkg-pr-new

pkg-pr-new Bot commented May 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/knip@1768
npm i https://pkg.pr.new/@knip/language-server@1768
npm i https://pkg.pr.new/@knip/mcp@1768

commit: 61da869

@jakeleventhal jakeleventhal changed the title [codex] Avoid caching failed plugin config loads Avoid caching failed plugin config loads May 26, 2026
@jakeleventhal jakeleventhal marked this pull request as ready for review May 26, 2026 14:01
@webpro

webpro commented May 28, 2026

Copy link
Copy Markdown
Member

Thanks Jake! Tested locally and pushed a fix on top.

@webpro webpro merged commit 5e201cd into webpro-nl:main May 28, 2026
30 checks passed
@webpro

webpro commented May 31, 2026

Copy link
Copy Markdown
Member

🚀 This pull request is included in v6.15.0. See Release 6.15.0 for release notes.

Using Knip in a commercial project? Please consider becoming a sponsor.

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.

2 participants