backfill icon indicating copy to clipboard operation
backfill copied to clipboard

Confusion over dependencies between yarn workspace packages - yarn workspace dependencies don't trigger cache misses if dependent

Open IgnusG opened this issue 4 years ago • 0 comments

Assuming there are 2 existing caches for workspace A and B and workspace A depends on workspace B. If something changes now in workspace B and it causes it to rebuild, lage will still consider workspace A as a cache hit and will not rebuild it which causes an inconsistency:

This is the lage.config I'm using

const package = require("./package.json");

module.exports = {
  pipeline: {
    patch: ["^patch"],
    development: ["^development"],
    build: ["^build"]
  },
  npmClient: "yarn",
  cacheOptions: {
    outputGlob: [`${package["project-configuration"].buildDirectory}/**`],
    validateOutput: true,
    clearOutputFolder: true,
  },
};

For the package dependencies I simply use yarn workspaces and normal imports from on package to the other.

IgnusG avatar Dec 18 '21 19:12 IgnusG