You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! Huge fan of this tool, and I'd like to propose a new feature that I often wish existed when working with "expensive" tasks (that take a long time to run and/or use a lot of resources) - a way to mark a task as up-to-date without actually running it.
Something like task --mark-up-to-date MY_TASK, which does not execute any of the commands or has any side-effect other than updating the fingerprint / hash in .task/checksumas if it had actually ran.
This is almost like an inverse command of --force
Use Case
The use-case here is that sometimes I have tasks where I perform an action that updates its dependencies outside of task, and I know that the given task is now up-to-date, but task doesn't.
This most often comes up when dealing with package management / installing dependencies. For example, let's say I have a full-stack web-app with Python and some sort of JS framework. I might have some tasks that look like this:
version: "3"tasks:
# Keep JS packages up-to-dateinstall:js:
sources:
- package*..jsoncmd: npm ci# Keep Python packages up-to-dateinstall:py:
sources:
- requirements.txtcmd: pip install -r requirements.txt# Running `task build` will auto re-install packages if there are changesbuild:
- task: install:js
- task: intall:py
- npm run build
Most of the time, this feels magical: if I checkout someone else's branch who has changed packages / required modules, and run task build, I don't have to remember to manually update my local deps to match. However, if I manually do something like npm install {some-random-package}, the next time I run task build it is going to detect that package-lock.json has changed and completely rebuild node_modules, even though it is up to date.
This is where a task --mark-up-to-date install:js option would be wonderful.
There are ways around this (e.g., npm ci is not the fastest way to update deps, although it is the "cleanest"), so I want to make it clear this isn't the only use case. Pretty much any task that takes a long time to run and potentially is already-up-to-date due to user actions outside of a task is a prime candidate.
Other Notes / Wrap-up
I wanted this badly enough that I slapped together a somewhat-hacky workaround (here) that clones an existing task entry, but without the command(s) / side-effects, runs it, and then writes over the fingerprint hash file. It works, but obviously I'd prefer this functionality just be built into the application natively.
Is this something that there are already any plans to implement? Or something that y'all would be open to?
The text was updated successfully, but these errors were encountered:
Hello! Huge fan of this tool, and I'd like to propose a new feature that I often wish existed when working with "expensive" tasks (that take a long time to run and/or use a lot of resources) - a way to mark a task as up-to-date without actually running it.
Something like
task --mark-up-to-date MY_TASK
, which does not execute any of the commands or has any side-effect other than updating the fingerprint / hash in.task/checksum
as if it had actually ran.Use Case
The use-case here is that sometimes I have tasks where I perform an action that updates its dependencies outside of
task
, and I know that the given task is now up-to-date, buttask
doesn't.This most often comes up when dealing with package management / installing dependencies. For example, let's say I have a full-stack web-app with Python and some sort of JS framework. I might have some tasks that look like this:
Most of the time, this feels magical: if I checkout someone else's branch who has changed packages / required modules, and run
task build
, I don't have to remember to manually update my local deps to match. However, if I manually do something likenpm install {some-random-package}
, the next time I runtask build
it is going to detect thatpackage-lock.json
has changed and completely rebuildnode_modules
, even though it is up to date.This is where a
task --mark-up-to-date install:js
option would be wonderful.There are ways around this (e.g.,
npm ci
is not the fastest way to update deps, although it is the "cleanest"), so I want to make it clear this isn't the only use case. Pretty much any task that takes a long time to run and potentially is already-up-to-date due to user actions outside of a task is a prime candidate.Other Notes / Wrap-up
I wanted this badly enough that I slapped together a somewhat-hacky workaround (here) that clones an existing task entry, but without the command(s) / side-effects, runs it, and then writes over the fingerprint hash file. It works, but obviously I'd prefer this functionality just be built into the application natively.
Is this something that there are already any plans to implement? Or something that y'all would be open to?
The text was updated successfully, but these errors were encountered: