Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR deprecates the use of `THASH` for cache partitioning. - The search string is `.*THASH.*` and can match things like `GITHASH`. Inferring env var inclusion based upon arbitrary substring inclusion regardless of position is too broad. (Should have been `^THASH_.+`.) - Squatting on an env var string not scoped to `^TURBO_.+` is (at least) not polite to the rest of the ecosystem. - Using this feature makes it more-difficult to share caches across machines and create reproducible builds. - Residual `THASH` variables from earlier arbitrary configuration can unnecessarily partition the cache. - The interaction between this feature and "strict" environment variable mode introduces complexity where a user can't easily reason about the behavior. Should the `THASH` variable be included into the global hash if unspecified? Should the `THASH` variable pushed into the execution environment? The original goal of this feature is to be able to quickly and dynamically change the hash key for a run. I find that the implicit nature is anathema to our goals. Previous use cases and recommendations: - Compare cache artifacts across multiple runs: use run summary or `--cache-dir`. - Make sure everything runs: use `--force`. - `SOMETHING_THASH=foo turbo run build` is just a hardcoded env var. Add it to `turbo.json` under `globalEnv` instead. --------- Co-authored-by: Mehul Kar <mehul.kar@vercel.com>
- Loading branch information