Invalidate compiled handler after route additions - #1909
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR fixes a critical AoT precompile bug where routes registered after async plugins fail to be found. The fix adds a ChangesRoute registration with compilation refresh
🎯 2 (Simple) | ⏱️ ~12 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/index.tsOops! Something went wrong! :( ESLint: 9.39.4 Error: ESLint configuration in --config » plugin:sonarjs/recommended is invalid:
Referenced from: /.eslintrc.json ... [truncated 291 characters] ... /node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2952:16) test/aot/analysis.test.tsOops! Something went wrong! :( ESLint: 9.39.4 Error: ESLint configuration in --config » plugin:sonarjs/recommended is invalid:
Referenced from: /.eslintrc.json ... [truncated 291 characters] ... /node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2952:16) Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #1907.
Summary:
Tests:
NOT_FOUNDBUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bun test test/aot/analysis.test.ts -t "handles route added after async plugin compilation"BUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bun test test/aot/analysis.test.tsBUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bun test test/aotBUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bun test test/core/elysia.test.tsBUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bun run test:typesBUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bunx prettier --check src/index.ts test/aot/analysis.test.tsgit diff --checkAlso checked:
BUN_INSTALL_CACHE_DIR=/tmp/elysia-1907-bun-cache bun run test:functionalitycurrently fails ontest/sucrose/integration.test.ts > Allows process to finishandtest/response/stream.test.ts > stop stream on canceled request; both failures reproduce on clean upstream HEAD (56310be) in a separate worktree, so I did not treat them as part of this change.AI assistance was used while drafting this patch; I reviewed the diff and verified the results above.
Summary by CodeRabbit
Bug Fixes
Tests