backfill
backfill copied to clipboard
Confusion over dependencies between yarn workspace packages - yarn workspace dependencies don't trigger cache misses if dependent
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.