heroku-buildpack-nodejs icon indicating copy to clipboard operation
heroku-buildpack-nodejs copied to clipboard

Allow Opting Out of Immutable Flags for Yarn 2

Open jpulec opened this issue 3 years ago • 3 comments

In some cases, a user may not want the --immutable-cache or --immutable flag to be passed. One example I have is when you have a repo with some workspace packages that you're not passing to Heroku by adding them to your .slugignore. In this case, the lock files would change, which means calling install --immutable will fail.

Additionally, when yarn install --immutable does fail for this reason, there's no indication, and the build just appears to hang.

jpulec avatar Aug 25 '20 00:08 jpulec

https://github.com/heroku/heroku-buildpack-nodejs/pull/836 solves half of this, but we still need a way to call Yarn 2 without --immutable. @jpulec how should the buildpack detect that yarn.lock should be mutable?

danielleadams avatar Sep 14 '20 21:09 danielleadams

I'm wondering if it makes sense to allow disabling this via an environment variable. Something that is off by default, but could be set to allow lockfile discrepencies, i.e. YARN_IMMUTABLE=false.

jpulec avatar Sep 26 '20 21:09 jpulec

Any updates here?

joeyfigaro avatar Apr 05 '21 14:04 joeyfigaro