Repository navigation
fix: preserve output when translation resources cannot be read - #826
Merged
samuelstroschein merged 1 commit intoOct 19, 2026
Merged
samuelstroschein merged 1 commit into
samuelstroschein merged 1 commit into
Conversation
Reject ResourceFileImportError diagnostics before compiling or writing output, with an AggregateError that identifies each path and filesystem error code. Keep the existing cleanup path so the loaded project is closed and a later compilation can retry. Missing files remain tolerated, other project diagnostics retain their warning behavior, and compileProject remains under its caller's error policy. Match the diagnostic name because the SDK does not export the error class. Cover clean and incremental output, the original read error, project cleanup and same-process recovery with the real message-format plugin. The two regression cases fail against the base and pass with this change. Native filesystem and CLI checks also confirm that unreadable resources preserve the prior output and return a failure status. Fixes opral#825.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #825.
An unreadable translation resource currently produces a warning only after compilation has replaced the previous output. Check
ResourceFileImportErrordiagnostics beforecompileProject()andwriteOutput(), and reject with anAggregateErrorthat identifies each affected path and filesystem error code.The existing cleanup path closes the loaded project and permits a later compilation to retry. Missing resources (
ENOENT) remain tolerated, other diagnostics retain their warning behavior, andcompileProject()remains under its caller's error policy. The diagnostic is matched by name because the SDK does not export its error class.Validation:
EACCES: the previous version loses the German translation; the fix preserves the previous output and recovers after restoring readability.EISDIR: before the fix, exit 0 and changed output; after the fix, exit 1 and byte-identical output; recovery exits 0.pnpm test --maxWorkers=2 --minWorkers=1: 63 files passed, 996 tests passed, 5 skipped, including typecheck and coverage. An earlier unrestricted run had three timeouts; those cases passed in isolation and in this complete run without changing their timeouts.tsc --build, targeted Oxlint, Prettier andgit diff --checkpassed.