sbt/notes
BrianHotopp b11adb6a88
[2.x] fix: Keep the output-flush timer alive across forceFlush (#9414)
NetworkChannel batches writes to the client at most once per 20ms to
reduce terminal flicker and byte volume. forceFlush(), used to order
buffered stdout ahead of a control-plane message, called
flushExecutor.shutdownNow() -- the only place the executor was ever
shut down. Once it ran during active output it tore the executor
down (and, if a coalesced flush was pending, cancelled its future
without resetting flushFuture, leaving the slot stuck), so the 20ms
coalescing was gone for the rest of the connection: stdout was then
flushed per write via the inline fallback instead of batched. Output
still reaches the client, so the effect is extra flushes rather than
lost output, but shutting the shared executor down on the first
forceFlush is clearly unintended.

Extract the flush state machine into CoalescingFlusher. forceFlush now
drains immediately and leaves the timer live (a pending coalesced
drain harmlessly drains the remainder when it fires); the executor is
shut down once, at channel teardown, so it no longer leaks. doFlush
now holds a lock across both the drain and the publish so an inline
forceFlush and the timer's drain can't deliver two stdout batches out
of order.

Fixes #9415

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 14:15:32 -04:00
..
1.0.0 Implement sequential[B](tasks: Seq[Initialize[Task[B]]]) and remove useless comment outs 2018-09-19 20:54:18 -04:00
1.0.3 Merge branch '1.x' into help-sbt-new 2017-12-11 16:57:40 +00:00
1.1.2 Add more configuration axis ScopeFilter factory methods 2018-03-06 23:01:31 +01:00
1.1.4 [alodavi/improving_loading_settings_messaging] added notes on the Pr 2018-05-15 14:44:00 +02:00
1.1.5 move notes to 1.1.5 2018-05-04 16:39:05 +02:00
1.2.0 Revert "don't require publishTo specified if publishArtifact is `false`" 2019-08-08 00:36:36 -04:00
1.3.0 Set swoval.tmpdir with absolute path via globalBasePath (#5048) 2019-09-09 14:13:34 -04:00
1.6.0 Enable the asciiGraphWidth setting to the dependencyTree tasks. #5962 2021-10-19 02:15:31 +09:00
1.7.0 Filter incompatible Scala 3 projects in cross switch commands 2022-06-26 22:46:37 -04:00
1.8.0 Add support for BSP's buildTarget/outputPaths method 2022-08-03 10:13:48 +02:00
2.0.0 [2.x] fix: Keep the output-flush timer alive across forceFlush (#9414) 2026-07-10 14:15:32 -04:00
0.10.0.markdown Reorganize directory structure 2016-05-06 16:01:49 -04:00
0.10.1.markdown Reorganize directory structure 2016-05-06 16:01:49 -04:00
0.11.0.markdown Reorganize directory structure 2016-05-06 16:01:49 -04:00
0.11.3.markdown Reorganize directory structure 2016-05-06 16:01:49 -04:00
0.13.6.markdown Spelling (#8028) 2025-02-04 01:11:28 -05:00
0.13.7.markdown Spelling (#8028) 2025-02-04 01:11:28 -05:00
0.13.8.markdown https://www.scala-sbt.org 2019-09-05 14:11:13 -04:00
0.13.9.markdown https://github.com 2019-09-05 14:11:04 -04:00
0.13.11.markdown Spelling (#8028) 2025-02-04 01:11:28 -05:00
0.13.12.markdown https://github.com 2019-09-05 14:11:04 -04:00
0.13.13.markdown https://www.scala-sbt.org 2019-09-05 14:11:13 -04:00
0.13.14.markdown https://www.scala-sbt.org 2019-09-05 14:11:13 -04:00
0.13.16.markdown Fix the several typos detected by github.com/client9/misspell 2018-08-08 15:57:34 +09:00
1.0.0.markdown Spelling (#8028) 2025-02-04 01:11:28 -05:00
1.0.1.markdown https://github.com 2019-09-05 14:11:04 -04:00
1.0.2.markdown contributors 2017-09-16 20:32:33 -04:00
1.0.3.markdown notes for 1.0.3 2017-10-26 22:39:35 -04:00
1.0.4.markdown Spelling (#8028) 2025-02-04 01:11:28 -05:00
1.1.0.markdown Spelling (#8028) 2025-02-04 01:11:28 -05:00
1.1.1.markdown https://github.com 2019-09-05 14:11:04 -04:00
about.markdown https://www.scala-sbt.org 2019-09-05 14:11:13 -04:00
sample.md Add project id to watching message 2017-12-15 01:49:14 +00:00