Skip to content

BC-break: working directory prepended twice to watch directories #81

Open
@MasonM

Description

@MasonM

v0.1.28 (specifically, 0c28810) changed the watch attribute so the workingDir is automatically prepended to each file. I think that change makes sense, but unfortunately it's backwards-incompatible, since it means the workingDir will be prepended twice if you were relying on the previous behavior. Here's a minimal reproduction example (adapted from https://github.com/argoproj/argo-workflows/blob/main/tasks.yaml):

apiVersion: kit/v1
kind: Tasks
metadata:
  name: argo-workflows
spec:
  tasks:
    - name: ui-deps
      command: yarn install
      workingDir: ui
      watch: ui/package.json ui/yarn.lock

In v0.1.27, this worked:

$ kit -v
v0.1.27

$ kit ui-deps

isCI=false
noWatch=false
[ui-deps] starting process "yarn install"
[ui-deps] waiting for process 143744 pgid 143744 ("yarn install")
[ui-deps]  yarn install v1.22.22
[ui-deps]  [1/5] Validating package.json...
[ui-deps]  [2/5] Resolving packages...
[ui-deps]  success Already up-to-date.
[ui-deps]  Done in 0.20s.
[ui-deps] process exited 143744: <nil>
[ui-deps] context cancelled, stopping process
[ui-deps] terminating process 143744
[ui-deps] waiting 3s before killing 143744

In v0.1.72, you get an error:

 $ ~/go/bin/kit -v ui-deps
v0.1.72

 $ ~/go/bin/kit ui-deps
no such file or directory

Also, it seems v0.1.46 changed the error reporting so it's less useful, because you used to get more detailed error messages for missing files, e.g.

$ ./kit -v && ./kit ui-deps
v0.1.45

[ui-deps] (running) starting process
stat ui/ui2/package.json: no such file or directory

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions