Skip to content

fix: end a build whose output report has nowhere to go - #362

Merged
alexander-akait merged 1 commit into
mainfrom
fix/output-report-without-a-file-system
Sep 14, 2026
Merged

alexander-akait merged 1 commit into
mainfrom
fix/output-report-without-a-file-system

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Summary

writeOutputFile guards against a compiler with no outputFileSystem:

new Promise((finish, bail) => {
  if (!compiler.outputFileSystem) return;

The return leaves the promise unsettled. What awaits it is processAssets's own callback, through await Promise.all(...) over the outputReport writes — so the guard did not skip the write, it hung the build. No error, no report, no end. Confirmed by calling it with a compiler that has no file system: the promise is still pending after 1.5s.

It answers now, which is what the guard meant to do.

What kind of change does this PR introduce?

fix.

Did you add tests for your changes?

Yes — test/utils.test.js races the call against a timer and asserts it answered. Against unmodified src/ it fails with 'never answered'; a first version of it let the process exit instead, so the timer is no longer unref'd and the regression fails rather than cancelling the suite.

Does this PR introduce a breaking change?

No.

If relevant, what needs to be documented once your changes are merged or what have you already documented?

n/a.

Use of AI

AI was used. It was asked for a small bug to exercise the release workflow with, picked this one out of an earlier audit, reproduced the unsettled promise before changing anything, and wrote the fix and the test.

🤖 Generated with Claude Code

https://claude.ai/code/session_01GzZci4NQeiqwdrVfd7dGXy


Generated by Claude Code

`writeOutputFile` guards against a compiler with no output file system by
returning from inside the promise it answers with — which settles nothing.
What awaits it is `processAssets`'s own callback, so the guard did not skip
the write, it hung the build: no error, no report, no end.

It answers now, which is what the guard meant to do.
@codecov

codecov Bot commented Sep 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.52%. Comparing base (af3f2b3) to head (10e099d).
⚠️ Report is 54 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #362      +/-   ##
==========================================
+ Coverage   98.69%   99.52%   +0.83%     
==========================================
  Files           6       17      +11     
  Lines         230     4252    +4022     
  Branches       65        0      -65     
==========================================
+ Hits          227     4232    +4005     
- Misses          3       20      +17     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alexander-akait
alexander-akait merged commit 00ad470 into main Sep 14, 2026
17 checks passed
@alexander-akait
alexander-akait deleted the fix/output-report-without-a-file-system branch September 14, 2026 16:32
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.

1 participant