rewatch watcher: the lock-file exit path is duplicated
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- rust
- Domain
- build-system
Research direction
Start with the two copies of the exit block in rewatch/src/watcher.rs, near lines 393 and 635, and compare their lock-file checks line by line. Move the shared logic into one helper function and have both call sites use it, without changing behaviour. Done means both paths call the helper and the existing rewatch Rust tests (cargo test in rewatch/) still pass.
Written by the indexing model from the issue text.
Description
Found by differential semantic drift analysis from ece8b148 to a7721303.
What is broken
In rewatch/src/watcher.rs, the block that removes the lock file and exits with "Exiting... (lockfile removed)" appears twice: at L393 and, added by #8730, at L635, each with its own check for the lock file. A future change to the exit behaviour has to be made in both places.
Possible cause (speculation only)
A guess: #8730 fixed the full-rebuild path by copying the existing exit block into it, rather than factoring it into a shared function.
- Dominant language
- OCaml
- Stars
- 7.5k
- Forks
- 484
- Avg merge
- 22h 10m
- Merged PRs (30d)
- 70
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from rescript-lang/rescript
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rescript-lang/rescript#8763 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
rescript-lang/rescript#8761 ·
Maintainers usually reply within 1 day
-
Issues from differential semantic drift analysis (ece8b148 to a7721303)Possibly taken @cknitt claimed this today. Open
rescript-lang/rescript#8768 · 1 assignee ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 55/100
rescript-lang/rescript#8767 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 72/100
rescript-lang/rescript#8766 ·
Maintainers usually reply within 1 day
All issues in rescript-lang/rescript
Similar issues
-
[request] vsg/1.1.16Openupstream update
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
conan-io/conan-center-index#31142 ·
Maintainers usually reply within 1 day
-
bot-found documentation priority: P3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
madenvel/KalinkaPlayer#313 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug CMake build system
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
E3SM-Project/E3SM#8853 ·
Maintainers usually reply within 2 days