Skip to content

Prevent pub get stdout backpressure from stalling compilation - #386

Open
raystubbs wants to merge 2 commits into
Tensegritics:mainfrom
raystubbs:fix/pub-get-stdout
Open

raystubbs wants to merge 2 commits into
Tensegritics:mainfrom
raystubbs:fix/pub-get-stdout

Conversation

@raystubbs

@raystubbs raystubbs commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Redirect the synchronous pub get call's stdout to the platform null device. Currently :out nil leaves an unread pipe while exec waits for the child to exit; enough output fills the pipe and can stall compilation indefinitely.

This changes only that callsite. Dependency resolution still runs; stdin, inherited stderr, and exit-code handling are preserved. The asynchronous analyzer's input/output pipes are untouched. A File sink avoids introducing the Java 9 Redirect/DISCARD API.

Verification

  • clj -M -m cljd.process-test: 3 tests, 13 assertions.
  • clj -M -m cljd.build-test: 12 tests, 27 assertions.
  • A real child writes 1 MiB with no stdout reader and must finish within a bounded timeout; a separate child verifies nonzero exit handling.
  • The suite checks the compiler callsite and preserves the analyzer's live pipes.
  • Mutation check: restoring :out nil failed the sink assertion and bounded child-completion assertion; restoring the fix passed again.
  • The regression suite can be run with the command above; workflow configuration is intentionally excluded from this PR.

Local investigation on Windows found an unread-pipe invocation stalled for over six minutes; redirecting the same invocation's output allowed it to complete. This PR addresses that failure mode; it makes no general compilation speedup claim.

@raystubbs
raystubbs marked this pull request as ready for review October 8, 2026 17:52
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