Skip to content

Conversation

@fasterthanlime
Copy link
Contributor

Previously, when a file change event arrived while a build was in progress (i.e., client stage was not Success/Failed/Aborted), the event was logged and silently discarded. This caused issues with tools like stylance, tailwind watch, or sass --watch that generate output files in response to source file changes.

The typical failure case:

  1. User saves a .module.scss file
  2. dx starts rebuilding
  3. stylance CLI (watching the same file) regenerates stylance.css
  4. dx receives the stylance.css change event but discards it
  5. Build completes with stale CSS

Now, file changes that arrive during a build are queued in a pending_file_changes vector and processed after the build completes.

…pping them

Previously, when a file change event arrived while a build was in progress
(i.e., client stage was not Success/Failed/Aborted), the event was logged
and silently discarded. This caused issues with tools like stylance,
tailwind watch, or sass --watch that generate output files in response
to source file changes.

The typical failure case:
1. User saves a .module.scss file
2. dx starts rebuilding
3. stylance CLI (watching the same file) regenerates stylance.css
4. dx receives the stylance.css change event but discards it
5. Build completes with stale CSS

Now, file changes that arrive during a build are queued in a
pending_file_changes vector and processed after the build completes.
if let Some(_patching) =
err.downcast_ref::<crate::build::PatchError>()
BuilderUpdate::BuildReady { bundle } => {
match bundle.mode {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, I guess Rust format was there.

@fasterthanlime fasterthanlime marked this pull request as ready for review November 21, 2025 21:59
@fasterthanlime fasterthanlime requested a review from a team as a code owner November 21, 2025 21:59
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