Does `nowrite` ever take effect?
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 2.5k
- Forks
- 650
- Avg merge
- 6m
- Merged PRs (30d)
- 3
Description
--dry-run sets both nowrite(false) and options.dry_run = true. The thing is, so long as options.dry_run == true, Task execution short-circuits before it ever gets to execute any FileUtils methods.
So the question is... does nowrite/noop ever take effect?
The only way I can find to get Rake to tell me what it would do (without doing it) is:
$ rake -E 'Rake.nowrite(true)'
(That's the behavior I expected from --dry-run, honestly.)
So... are the noop/nowrite branches effectively dead code? Or am I missing something?
Contributor 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.
Research direction
Start with the task execution short-circuit in lib/rake/task.rb and compare it with the nowrite/noop behavior reached through FileUtils. Reproduce the issue using --dry-run and Rake.nowrite(true), then trace whether those branches are reachable. Done means establishing the intended behavior and documenting or reporting the required change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- build-system, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100