Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

rewatch watcher: the lock-file exit path is duplicated

Open Beginner friendly
#8,765 0 comments 0 reactions 0 assignees View on GitHub

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

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rescript-lang/rescript

All issues in rescript-lang/rescript

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.