fix: stabilize server function manifest build output#6763
fix: stabilize server function manifest build output#6763motopods wants to merge 3 commits intoTanStack:mainfrom
Conversation
…ManifestModule Co-authored-by: motopods <58200641+motopods@users.noreply.github.com>
📝 WalkthroughWalkthroughThe manifest generation now sorts manifestEntries by function ID in ascending order before mapping them to string entries; no other logic, error handling, or public API changes were made. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@packages/start-plugin-core/src/start-compiler-plugin/plugin.ts`:
- Line 117: Replace the locale-dependent comparator in the Array.prototype.sort
call that currently uses a.localeCompare(b); instead use a deterministic UTF-16
code-unit comparator, e.g. change the comparator in the .sort(([a], [b]) => ...)
expression to return (a < b ? -1 : a > b ? 1 : 0) so ordering is reproducible
across runtimes.
…ifest generation (#3) * Initial plan * Replace localeCompare with deterministic UTF-16 code unit comparison in generateManifestModule Co-authored-by: motopods <58200641+motopods@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: motopods <58200641+motopods@users.noreply.github.com>
|
please add a comment into the code why we are sorting here |
|
View your CI Pipeline Execution ↗ for commit fcfaec8
☁️ Nx Cloud last updated this comment at |
generateManifestModuleiteratedserverFnsByIdviaObject.entrieswithout sorting, producing manifest map keys in insertion order — which varies across builds and causes non-deterministic build artifacts.Changes
packages/start-plugin-core/src/start-compiler-plugin/plugin.ts: Sort manifest entries by key (alphabetically) before code generation.Fix #6762
Summary by CodeRabbit