folke / ultra-runner

🏃⛰ Ultra fast monorepo script runner and build tool
https://www.npmjs.com/package/ultra-runner
Apache License 2.0
1.2k stars 32 forks source link

Builds never cached if there is a dep on a build-less dep #163

Closed hipstersmoothie closed 3 years ago

hipstersmoothie commented 3 years ago

I have two packages @packages/a and @packages/b. @packages/a has no build step and @packages/b has a build step. @packages/b depends on @packages/a

When I run yarn ultra -r --filter "@packages/b" --build build the cache is never hit and it does a full rebuild. I'm guessing this is because @packages/a has no build, it gets no cache file, and ultra-runner thinks it needs to build it again.

hipstersmoothie commented 3 years ago

Adding an empty build step fixes the problem, creating a cache for the buildless dep

{
  "scripts": {
    "build": "echo nope"
  }
}
timofei-iatsenko commented 3 years ago

empty script would be enough:

{
  "scripts": {
    "build": ""
  }
}
timofei-iatsenko commented 3 years ago

Duplicate https://github.com/folke/ultra-runner/issues/115

hipstersmoothie commented 3 years ago

Closing since it's a dupe