Skip to content

feat(compile): support watch mode#34860

Merged
littledivy merged 3 commits into
mainfrom
orch/divybot-457
Jun 5, 2026
Merged

feat(compile): support watch mode#34860
littledivy merged 3 commits into
mainfrom
orch/divybot-457

Conversation

@divybot

@divybot divybot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Adds watch-mode support to deno compile using the existing CLI file watcher loop. The compile graph is built through the watcher-aware factory so local graph files are registered and changes trigger a rebuild of the output executable.

Tests:

  • cargo test -p deno --lib compile_watch_with_no_clear_screen
  • cargo test --test integration compile_watch_test

Closes #20086
Closes denoland/divybot#457

@littledivy littledivy left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this also watch included files and icons?

Co-Authored-By: Divy Srivastava <[email protected]>
@divybot

divybot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

Updated this to explicitly watch compile asset paths too:

  • compile.include / --include roots are registered with the watcher in addition to graph modules.
  • --icon is resolved relative to the compile cwd and registered with the watcher as well.
  • Added unit coverage for include/icon watch path collection.
  • Extended the watcher integration test to mutate a raw included file and verify the rebuilt executable embeds the new contents.

Local verification:

  • cargo test -p deno --lib compile_watch passed
  • cargo test --test integration compile_watch_test passed before this follow-up; rerunning after this follow-up hit local disk exhaustion during relinking (No space left on device), before the test ran.

@littledivy
littledivy enabled auto-merge (squash) June 5, 2026 04:04
@divybot

divybot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor Author

CI note: the remaining failure is in test node_compat (1/3) debug linux-x86_64, specifically node_compat::parallel::test-dns-resolver-max-timeout.js. The log shows a timing-sensitive assertion failure after retries:

timeout1: 501, timeout2: 502
assert.strictEqual(timeout1 > timeout2, true);

This is unrelated to deno compile --watch and the other checks, including WPT and the compile/watch-relevant integration suites, passed. I attempted to rerun the failed job, but this gh version does not support targeted rerun flags here and the REST rerun-failed-jobs endpoint returned HTTP 403 for this token.

@littledivy
littledivy merged commit 7b251d9 into main Jun 5, 2026
136 checks passed
@littledivy
littledivy deleted the orch/divybot-457 branch June 5, 2026 07:35
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.

Watch mode for deno compile is documented but not implemented

2 participants