Repository navigation
fix(install): ignore validation and output settings in the install config hash - #366
Conversation
✅ Deploy Preview for yarn-v6 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
⏱️ Benchmark Resultsgatsby install-full-cold
📊 Raw benchmark data (gatsby install-full-cold)Base times: 4.397s, 4.459s, 4.421s, 4.337s, 4.333s, 4.430s, 4.342s, 4.469s, 4.393s, 4.360s, 4.481s, 4.389s, 4.304s, 4.384s, 4.373s, 4.441s, 4.364s, 4.343s, 4.403s, 4.348s, 4.434s, 4.447s, 4.336s, 4.378s, 4.330s, 4.366s, 4.413s, 4.368s, 4.372s, 4.371s Head times: 4.317s, 4.283s, 4.320s, 4.365s, 4.413s, 4.322s, 4.394s, 4.302s, 4.327s, 4.339s, 4.354s, 4.305s, 4.292s, 4.351s, 4.355s, 4.356s, 4.339s, 4.336s, 4.313s, 4.288s, 4.289s, 4.318s, 4.346s, 4.367s, 4.335s, 4.313s, 4.312s, 4.314s, 4.361s, 4.321s gatsby install-cache-only
📊 Raw benchmark data (gatsby install-cache-only)Base times: 1.312s, 1.307s, 1.300s, 1.293s, 1.309s, 1.303s, 1.307s, 1.308s, 1.300s, 1.305s, 1.294s, 1.350s, 1.318s, 1.317s, 1.305s, 1.297s, 1.316s, 1.306s, 1.322s, 1.313s, 1.326s, 1.311s, 1.306s, 1.317s, 1.312s, 1.293s, 1.292s, 1.296s, 1.311s, 1.305s Head times: 1.285s, 1.314s, 1.300s, 1.297s, 1.329s, 1.307s, 1.308s, 1.292s, 1.302s, 1.313s, 1.299s, 1.309s, 1.316s, 1.310s, 1.309s, 1.341s, 1.304s, 1.288s, 1.312s, 1.464s, 1.308s, 1.299s, 1.306s, 1.301s, 1.299s, 1.310s, 1.311s, 1.283s, 1.303s, 1.303s gatsby install-cache-and-lock (warm, with lockfile)
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))Base times: 0.360s, 0.372s, 0.362s, 0.365s, 0.368s, 0.365s, 0.366s, 0.369s, 0.376s, 0.372s, 0.380s, 0.363s, 0.367s, 0.365s, 0.368s, 0.367s, 0.366s, 0.363s, 0.368s, 0.359s, 0.363s, 0.366s, 0.361s, 0.356s, 0.362s, 0.364s, 0.375s, 0.367s, 0.373s, 0.373s Head times: 0.396s, 0.374s, 0.364s, 0.366s, 0.369s, 0.370s, 0.369s, 0.372s, 0.367s, 0.366s, 0.366s, 0.367s, 0.369s, 0.375s, 0.371s, 0.372s, 0.402s, 0.377s, 0.365s, 0.367s, 0.370s, 0.363s, 0.367s, 0.365s, 0.373s, 0.368s, 0.368s, 0.365s, 0.368s, 0.366s |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: b93c9c8a-9f47-4087-a0e8-9166233f52d6) |
…nfig hash `yarn install --immutable` forces enableImmutableInstalls, and the install config hash covered every setting. The next command saw a "changed configuration" and ran a full lazy install. The hash now skips settings that can't change the installed tree: immutable-install checks, output settings (timers, progress bars), lazyInstallMode, and daemon/changeset settings. enableImmutableCache stays hashed, since it changes how the cache gets filled. The fast-path test that used YARN_ENABLE_TIMERS to change the configuration now changes pnpFallbackMode instead.
Settings now contribute to the install config hash unless they set "affectsInstall": false in the schema, replacing the hardcoded list in project.rs.
b234ba0 to
80e2818
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: 5ae34887-6776-406e-b3ff-a8e8325c40cd) |
Issue:
--immutableforcesenableImmutableInstalls, and the install config hash covered every setting. The command afteryarn install --immutablesaw a "changed configuration" and ran a full lazy install. Toggling timers or progress bars did the same.Fix: the hash skips settings that can't change the installed tree: immutable checks, output settings,
lazyInstallMode, and daemon/changeset settings.enableImmutableCachestays hashed, since it changes how the cache gets filled.Opting out is declared in
schema.json: every setting is hashed by default, and a setting can set"affectsInstall": falseonly if changing it can't affect the install.build.rsgenerates the list of opted-out settings, andinstall_config_hashdrops those keys before hashing. The contributing docs describe the flag.Tests: the fast-path test now uses
pnpFallbackModeas its configuration change. New lazy-install test.Note
Medium Risk
Changes when installs are considered stale via install-state hashing; misclassified
affectsInstallcould skip a needed reinstall or still force extra installs.Overview
Fixes lazy installs and the up-to-date fast path treating validation-only or cosmetic config changes as a full configuration change (e.g.
yarn install --immutableflippingenableImmutableInstalls, or toggling timers/progress bars).Top-level settings can now opt out of the install config hash via
"affectsInstall": falseinschema.json(default remains hashed). The config code generator emitsSettings::install_insensitive_setting_names(), andinstall_config_hashremoves those keys before hashing. Several settings are marked install-insensitive (immutable checks, UI output, daemon tuning, changeset refs,lazyInstallMode, etc.). Contributor docs describe the rule.Acceptance tests assert immutable install does not trigger a follow-up lazy install, and the “config changed” fast-path test uses
pnpFallbackModeinstead of a non-install-sensitive env var.Reviewed by Cursor Bugbot for commit 80e2818. Bugbot is set up for automated code reviews on this repo. Configure here.