Duplication of files (in wrong dirs) when doing multiple dir copies
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 2.5k
- Forks
- 72
- PR merge metrics
- No merged PRs in 30d
Description
I have a taskfile that has a portion like this:
```js
module.exports.copyProcs = async function copyProcs(task) {
await task.source('procs/**/*.js').target('dist/procs')
await task.source('procs/**/.*').target('dist/procs')
}
module.exports.copyConf = async function copyConf(task) {
await task.source('conf/**/.*').target('dist/conf')
}
module.exports.copyDirs = async function copyDirs(task) {
await task.parallel(['copyProcs', 'copyConf'])
}
module.exports.build = async function build(task) {
// compile is not necessary to show
await task.serial(['compile', 'copyDirs'])
}
```
`taskr build` is my `yarn build`
This should copy all `.js` files and `.` files (specifically `.gitignore`) from `procs` to `dist/procs`
It should also copy all `.` files (specifically `.eslintrc` and `.jscsrc`) from `conf` to `dist/conf`
When run, it is copying `.eslintrc` and `.jscsrc` to _both_ `dist/conf` and `dist/procs`.
If I change the content of `function copyDirs` to `await task.serial(['copyProcs', 'copyConf'])` it works as expected.
Not sure what the reason it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the shown task definitions and run `taskr build`, comparing `copyDirs` with parallel and serial execution. Trace the task runner's handling of concurrent directory-copy operations. Done means `.js` and dotfiles from `procs` appear only in `dist/procs`, while dotfiles from `conf` appear only in `dist/conf` during parallel execution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100