task icon indicating copy to clipboard operation
task copied to clipboard

When I set watch for a task that uses deps from includes, then the wrong watchlist is set

Open sirenkovladd opened this issue 1 year ago • 2 comments

example:

version: '3'

tasks:
  build:
    cmds:
      - echo subtask
    sources:
      - list.json
version: '3'

includes:
  sub:
    taskfile: ./sub
    internal: true

tasks:
  dev:
    deps: [sub:build]
    watch: true
    cmds:
      - node index.js
    method: none
    sources:
      - index.js
  • Task version: v3.34.1
  • Operating system: Darwin arm64
  • Experiments enabled: false

what i see the sub:build command is never called, even after restarting the task after editing json, the dev task is not reload (although when editing index.js it is reload)

sirenkovladd avatar Feb 13 '24 07:02 sirenkovladd

list.json has been modified and here is the run result after

task: Started watching for tasks: dev
task: Watching for changes every 5s
task: "dev" started
task: watching new file: /var/folders/36/nhtbdyy51gg2n2snnk7c7gnr0000gn/T/tmp.eXNSAjpqGg/index.js
task: "sub:build" started
task: Task "sub:build" is up to date
task: [dev] node index.js
{ q: 1 }
task: "dev" finished

sirenkovladd avatar Feb 13 '24 07:02 sirenkovladd

workaround

includes:
  sub:
    dir: ./sub
    taskfile: ./sub
    internal: true

sirenkovladd avatar Feb 13 '24 08:02 sirenkovladd