-
Notifications
You must be signed in to change notification settings - Fork 79
Description
Describe the bug
I had been providing relative paths and absolute paths in the inputs array to a task, but it doesn't seem to run the task again when these files are changed. Looking at the source code I realized that it only processes inputs of a package using globs against files that it has found in that package based on a git list-files operation.
This means that the inputs currently can only reference files that are inside that package. You can't use absolute paths and you cannot use relative paths starting with ../ to use files from another package as an input.
Currently for not particularly great reasons I was passing paths with ../ since we have a tool that runs in a package that needs to reference files from other packages and it doesn't use node style import resolution.
Also for tasks that use a worker I wanted to make the task depend on the worker script by providing the absolute path to that worker script.
Note that my change in #867 might fix this in the case where the inputs element does not have a wildcard.
I think that if relative and absolute paths are not supported, the software should give an error if it detects a relative or absolute path in the inputs array. It would be nice to support them, though.
To Reproduce
Create a task which has inputs elements that are either relative , e.g. ../packagename/package.json or aboslute, e.g. path.join(__dirname, 'scripts/babel-worker.cjs').
Expected behavior
It should not silently fail in these cases - either they would be supported or it would reject them with an error.