Skip to content

Fix dlx installs when caller enables constraint checks - #348

Merged
arcanis merged 1 commit into
mainfrom
rui.martins/dlx-constraints-check
Oct 6, 2026
Merged

arcanis merged 1 commit into
mainfrom
rui.martins/dlx-constraints-check

Conversation

@ruimartin

@ruimartin ruimartin commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Context

yarn dlx inherits the caller's enableConstraintsChecks: true setting, but installs into a temporary project without the caller's yarn.config.cjs. Its install then fails with Constraints configuration file not found, preventing one-off commands from running.

Change

Skip automatic constraint checks for the temporary install used by dlx. Normal project installs continue to honor enableConstraintsChecks.

Validation

Validated with a caller project that enables constraint checks and has a failing constraint: yarn dlx completes, while yarn install still reports the constraint violation. The release build and focused integration suites passed on the current main base.


Note

Low Risk
Narrow opt-out for dlx temp installs only; normal installs unchanged aside from the new flag defaulting to false.

Overview
Fixes yarn dlx failing when the caller has enableConstraintsChecks: true but the ephemeral dlx project has no yarn.config.cjs (previously surfaced as a missing constraints config error).

Adds skip_constraints_check on RunInstallOptions and sets it for dlx’s temporary install so automatic constraint validation is skipped there. Regular yarn install still runs constraint checks when the setting is enabled.

Adds an acceptance test: dlx succeeds under a failing constraint setup, while install still rejects with a constraint failure.

Reviewed by Cursor Bugbot for commit 81ec42c. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify

netlify Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for yarn-v6 ready!

Name Link
🔨 Latest commit 81ec42c
🔍 Latest deploy log https://app.netlify.com/projects/yarn-v6/deploys/6abe1c1a9f8e460007f13d05
😎 Deploy Preview https://deploy-preview-348--yarn-v6.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

⏱️ Benchmark Results

gatsby install-full-cold

Metric Base Head Difference
Mean 4.464s 4.495s +0.70% ⚠️
Median 4.458s 4.492s +0.76% ⚠️
Min 4.382s 4.409s
Max 4.572s 4.589s
Std Dev 0.054s 0.046s
📊 Raw benchmark data (gatsby install-full-cold)

Base times: 4.518s, 4.420s, 4.395s, 4.445s, 4.480s, 4.563s, 4.444s, 4.572s, 4.485s, 4.552s, 4.446s, 4.405s, 4.417s, 4.480s, 4.454s, 4.446s, 4.461s, 4.471s, 4.469s, 4.468s, 4.415s, 4.473s, 4.417s, 4.382s, 4.397s, 4.514s, 4.402s, 4.426s, 4.531s, 4.563s

Head times: 4.470s, 4.479s, 4.476s, 4.431s, 4.456s, 4.508s, 4.589s, 4.517s, 4.445s, 4.516s, 4.516s, 4.577s, 4.526s, 4.482s, 4.450s, 4.564s, 4.543s, 4.494s, 4.456s, 4.475s, 4.449s, 4.490s, 4.554s, 4.457s, 4.434s, 4.524s, 4.409s, 4.554s, 4.511s, 4.500s


gatsby install-cache-only

Metric Base Head Difference
Mean 1.363s 1.387s +1.77% ⚠️
Median 1.363s 1.364s +0.11% ⚠️
Min 1.342s 1.341s
Max 1.393s 2.020s
Std Dev 0.012s 0.120s
📊 Raw benchmark data (gatsby install-cache-only)

Base times: 1.354s, 1.359s, 1.349s, 1.369s, 1.363s, 1.347s, 1.370s, 1.360s, 1.379s, 1.365s, 1.381s, 1.393s, 1.362s, 1.355s, 1.358s, 1.342s, 1.347s, 1.342s, 1.375s, 1.362s, 1.365s, 1.365s, 1.364s, 1.366s, 1.376s, 1.380s, 1.365s, 1.360s, 1.345s, 1.362s

Head times: 1.345s, 1.341s, 1.347s, 1.357s, 1.363s, 1.369s, 1.349s, 1.355s, 1.349s, 1.361s, 1.387s, 1.347s, 1.370s, 1.373s, 1.362s, 1.388s, 1.384s, 2.020s, 1.361s, 1.379s, 1.374s, 1.359s, 1.385s, 1.384s, 1.379s, 1.366s, 1.354s, 1.376s, 1.353s, 1.367s


gatsby install-cache-and-lock (warm, with lockfile)

Metric Base Head Difference
Mean 0.387s 0.388s +0.22% ⚠️
Median 0.388s 0.388s +0.15% ⚠️
Min 0.378s 0.379s
Max 0.408s 0.399s
Std Dev 0.005s 0.005s
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))

Base times: 0.389s, 0.391s, 0.393s, 0.390s, 0.389s, 0.391s, 0.387s, 0.389s, 0.389s, 0.408s, 0.390s, 0.378s, 0.386s, 0.385s, 0.383s, 0.379s, 0.390s, 0.386s, 0.387s, 0.382s, 0.391s, 0.384s, 0.388s, 0.389s, 0.389s, 0.385s, 0.383s, 0.381s, 0.383s, 0.386s

Head times: 0.386s, 0.389s, 0.399s, 0.387s, 0.388s, 0.381s, 0.379s, 0.384s, 0.380s, 0.384s, 0.390s, 0.387s, 0.395s, 0.393s, 0.390s, 0.382s, 0.387s, 0.385s, 0.392s, 0.388s, 0.383s, 0.392s, 0.386s, 0.391s, 0.397s, 0.395s, 0.392s, 0.394s, 0.383s, 0.388s

@ruimartin
ruimartin requested a review from arcanis October 2, 2026 08:25
@ruimartin
ruimartin marked this pull request as ready for review October 2, 2026 08:25
@arcanis
arcanis merged commit e79971d into main Oct 6, 2026
25 checks passed
@arcanis
arcanis deleted the rui.martins/dlx-constraints-check branch October 6, 2026 21:58

This branch was successfully deployed

1 active deployment
test-reports — 81ec42cf Deployed Oct 1, 2026 by ruimartin via Reporting test results #1360
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants