Repository navigation
Keep watch alive after rebuild errors - #8641
fhammerschmidt wants to merge 6 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
26da9d5 to
38467bf
Compare
96c35a5 to
9760751
Compare
38467bf to
527e72a
Compare
9760751 to
9f7e428
Compare
527e72a to
95cbeca
Compare
9f7e428 to
a90a656
Compare
95cbeca to
08c262a
Compare
a90a656 to
766e69a
Compare
08c262a to
23913a4
Compare
766e69a to
35b5524
Compare
23913a4 to
4cc230a
Compare
35b5524 to
60b4bb6
Compare
4cc230a to
784f83f
Compare
60b4bb6 to
5cea2cf
Compare
784f83f to
bb678d0
Compare
5cea2cf to
7132187
Compare
bb678d0 to
52e838b
Compare
7132187 to
a32a29e
Compare
a4a65f3 to
3e45f81
Compare
rescript
@rescript/belt
@rescript/darwin-arm64
@rescript/darwin-x64
@rescript/linux-arm64
@rescript/linux-x64
@rescript/runtime
@rescript/win32-x64
commit: |
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
5e7c5a1 to
3377441
Compare
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3377441a3d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
|
Developer playground preview: https://rescript-lang.github.io/rescript/dev-playground/?version=pr-8641 |
Verdict: approve with nits. No correctness bugs found in the watch loop. Init errors propagate instead of panicking.
|
Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #8641 +/- ##
==========================================
+ Coverage 80.40% 80.51% +0.10%
==========================================
Files 447 447
Lines 60990 61060 +70
==========================================
+ Hits 49042 49162 +120
+ Misses 11948 11898 -50 🚀 New features to boost your workflow:
|
Log the source event path and its requested compile type once, then wait for the edited source to request full initialization and for an error after that event. Delayed config failures can no longer satisfy the recovery assertion before the edit is processed. Signed-off-by: Florian Hammerschmidt <florianh89@gmail.com>
|
The follow-ups document the exit-code change and dependency-install recovery limit, renumber the tests, and remove duplicate diagnostics. The recovery regression now waits for the source event and a subsequent initialization failure; disabling recovery makes it fail and reproduces stale output. Automatic detection of newly installed or replaced dependencies remains a follow-up; editing a watched source or touching |
A config or source-layout change that made full rebuild initialization fail caused watch mode to panic or exit. Initialization errors now propagate through the build lock, are reported to the user, and keep the watcher alive for recovery.
After initialization fails, later source edits retry full initialization until the current configuration can be loaded. They cannot emit outputs using the previous suffix, dependencies, or compiler options. Malformed dependency configs also return errors instead of exiting the process, retaining their resolved directory so the watcher can observe a correction to a newly added dependency. Dependency resolution failures retain their package-tree context and dependency name when propagated to the CLI.
Dependency resolution and configuration failures now return exit code
1instead of2fromrescript build,clean, andformat, using the CLI's normal error path. Dependency errors are reported once, retaining their package-tree context.Recovery limit: installing a missing dependency or replacing a non-local dependency directory does not itself trigger a retry. After installation or replacement, edit a watched source file or touch
rescript.jsonto retry initialization. Automatic detection of these installation changes remains a follow-up.Add regressions for editing a source while the root config is invalid, recovering with a changed suffix, and fixing only a newly added workspace dependency's config. The invalid-config test waits for the edited source's event to select full reinitialization and for an initialization failure after that event, so delayed config events cannot satisfy the assertion. The integration tests use the shared platform-aware polling helpers and stop cleanup if watcher shutdown fails.
Validation:
makepasses with the native watcher backend.cargo test --manifest-path rewatch/Cargo.tomlpasses: 145 tests.