folke/ultra-runner

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

hipstersmoothie opened this issue · 4 comments

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.

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

{
  "scripts": {
    "build": "echo nope"
  }
}

empty script would be enough:

{
  "scripts": {
    "build": ""
  }
}

Duplicate #115

Closing since it's a dupe