guybedford / guybedford/chomp

-r flag not rerunning interpolation task

Open
#157 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
168
Forks
8
PR merge metrics
No merged PRs in 30d

Description

The -r flag is supposed to rerun the provided tasks without caching. That is, chomp build -r will rerun the build task even if the build is cached and would be skipped. -r is different to -f in that it will only rerun the top-level task, while still caching dependencies. Useful for debugging specific tasks without invalidating their dependencies.

Currently chomp build -r is not rerunning interpolation tasks though for an interpolation task like:

[[task]]
name = 'build'
dep = 'src/#'
target = 'lib/#'
run = '''
  echo "running build"
  cp $DEP $TARGET
'''

Where chomp build -r in the above will continue to use the cached run.

The reason for this is that interpolations form a list of tasks, and the main task itself is treated as a pointer task which depends on the interpolation dependencies internally. The -r logic would need to detect this specific interpolation structure to properly rerun interpolation tasks.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start by reproducing chomp build -r with the interpolation task shown in the issue, then trace the -r handling and interpolation task logic. Done means the top-level interpolated task reruns while its dependencies remain cached, unlike -f.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, cli
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.