Open joelmukuthu opened 3 years ago
This issue reproduces on master:
Error: expect(received).resolves.not.toContain()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js rebuild esbuild
β€ YN0000: β Resolution step
::group::Resolution step
::endgroup::
β€ YN0000: β Completed
β€ YN0000: β Fetch step
::group::Fetch step
β€ YN0013: β 4 packages were already cached
::endgroup::
β€ YN0000: β Completed
β€ YN0000: β Link step
::group::Link step
β€ YN0007: β esbuild@npm:0.12.11 must be built because it never has been before or the last one failed
β€ YN0007: β xsd-schema-validator@npm:0.7.0 must be built because it never has been before or the last one failed
β€ YN0000: β esbuild@npm:0.12.11 STDERR Trying to install "esbuild-linux-64" using npm
β€ YN0000: β esbuild@npm:0.12.11 STDERR Failed to install "esbuild-linux-64" using npm: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false esbuild-linux-64@0.12.11
β€ YN0000: β esbuild@npm:0.12.11 STDERR /bin/sh: npm: not found
β€ YN0000: β esbuild@npm:0.12.11 STDERR
β€ YN0000: β esbuild@npm:0.12.11 STDERR Trying to download "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.12.11.tgz"
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDOUT [xsd-schema-validator] Compiling helper...
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDERR Error: Java SDK required at JAVA_HOME or in path to compile validation helper
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDERR at /tmp/tmp-18Mu02QSKlOdMr/.yarn/unplugged/xsd-schema-validator-npm-0.7.0-172763c240/node_modules/xsd-schema-validator/lib/validator.js:61:9
β€ YN0009: β xsd-schema-validator@npm:0.7.0 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-0b7eabfd/build.log)
β€ YN0000: β esbuild@npm:0.12.11 STDERR Install successful
::endgroup::
β€ YN0000: β Completed in 0s 654ms
β€ YN0000: Failed with errors in 0s 711ms
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0c0da74930.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:18:7)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
This issue reproduces on master:
Error: expect(received).resolves.not.toContain()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js rebuild esbuild
β€ YN0000: β Resolution step
::group::Resolution step
::endgroup::
β€ YN0000: β Completed
β€ YN0000: β Fetch step
::group::Fetch step
β€ YN0013: β 4 packages were already cached
::endgroup::
β€ YN0000: β Completed
β€ YN0000: β Link step
::group::Link step
β€ YN0007: β esbuild@npm:0.12.11 must be built because it never has been before or the last one failed
β€ YN0007: β xsd-schema-validator@npm:0.7.0 must be built because it never has been before or the last one failed
β€ YN0000: β esbuild@npm:0.12.11 STDERR Trying to install "esbuild-linux-64" using npm
β€ YN0000: β esbuild@npm:0.12.11 STDERR Failed to install "esbuild-linux-64" using npm: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false esbuild-linux-64@0.12.11
β€ YN0000: β esbuild@npm:0.12.11 STDERR /bin/sh: npm: not found
β€ YN0000: β esbuild@npm:0.12.11 STDERR
β€ YN0000: β esbuild@npm:0.12.11 STDERR Trying to download "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.12.11.tgz"
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDOUT [xsd-schema-validator] Compiling helper...
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDERR Error: Java SDK required at JAVA_HOME or in path to compile validation helper
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDERR at /tmp/tmp-18T22PIArV64tE/.yarn/unplugged/xsd-schema-validator-npm-0.7.0-172763c240/node_modules/xsd-schema-validator/lib/validator.js:61:9
β€ YN0009: β xsd-schema-validator@npm:0.7.0 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-24689234/build.log)
β€ YN0000: β esbuild@npm:0.12.11 STDERR Install successful
::endgroup::
β€ YN0000: β Completed in 0s 631ms
β€ YN0000: Failed with errors in 0s 679ms
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0c0da74930.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:18:7)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
This issue reproduces on master:
Error: expect(received).resolves.not.toContain()
Received promise rejected instead of resolved
Rejected to value: [Error: Command failed: /usr/bin/node /github/workspace/scripts/actions/../run-yarn.js rebuild esbuild
β€ YN0000: β Resolution step
::group::Resolution step
::endgroup::
β€ YN0000: β Completed
β€ YN0000: β Fetch step
::group::Fetch step
β€ YN0013: β 4 packages were already cached
::endgroup::
β€ YN0000: β Completed
β€ YN0000: β Link step
::group::Link step
β€ YN0007: β esbuild@npm:0.12.11 must be built because it never has been before or the last one failed
β€ YN0007: β xsd-schema-validator@npm:0.7.0 must be built because it never has been before or the last one failed
β€ YN0000: β esbuild@npm:0.12.11 STDERR Trying to install "esbuild-linux-64" using npm
β€ YN0000: β esbuild@npm:0.12.11 STDERR Failed to install "esbuild-linux-64" using npm: Command failed: npm install --loglevel=error --prefer-offline --no-audit --progress=false esbuild-linux-64@0.12.11
β€ YN0000: β esbuild@npm:0.12.11 STDERR /bin/sh: npm: not found
β€ YN0000: β esbuild@npm:0.12.11 STDERR
β€ YN0000: β esbuild@npm:0.12.11 STDERR Trying to download "https://registry.npmjs.org/esbuild-linux-64/-/esbuild-linux-64-0.12.11.tgz"
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDOUT [xsd-schema-validator] Compiling helper...
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDERR Error: Java SDK required at JAVA_HOME or in path to compile validation helper
β€ YN0000: β xsd-schema-validator@npm:0.7.0 STDERR at /tmp/tmp-190Ui5z2uv9wAU/.yarn/unplugged/xsd-schema-validator-npm-0.7.0-172763c240/node_modules/xsd-schema-validator/lib/validator.js:61:9
β€ YN0009: β xsd-schema-validator@npm:0.7.0 couldn't be built successfully (exit code 1, logs can be found here: /tmp/xfs-f89c2592/build.log)
β€ YN0000: β esbuild@npm:0.12.11 STDERR Install successful
::endgroup::
β€ YN0000: β Completed in 0s 665ms
β€ YN0000: Failed with errors in 0s 718ms
]
at expect (/github/workspace/.yarn/cache/expect-npm-24.8.0-8c7640c562-0c0da74930.zip/node_modules/expect/build/index.js:138:15)
at module.exports (evalmachine.<anonymous>:18:7)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async /github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:56:13
at async executeInTempDirectory (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:17:16)
at async Object.executeRepro (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/executeRepro.js:24:12)
at async ExecCommand.execute (/github/workspace/.yarn/cache/@arcanis-sherlock-npm-2.0.2-91650a2501-627bee24a7.zip/node_modules/@arcanis/sherlock/lib/commands/exec.js:25:38)
at async ExecCommand.validateAndExecute (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Command.js:161:26)
at async Cli.run (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:74:24)
at async Cli.runExit (/github/workspace/.yarn/cache/clipanion-npm-2.0.0-rc.16-b9444aaf89-91cf93ba72.zip/node_modules/clipanion/lib/advanced/Cli.js:83:28)
Self-service
Describe the bug
If I have two dependencies with post-install scripts, e.g. esbuild and xsd-schema-validator, running
yarn rebuild esbuild
will cause the post-install script for xsd-schema-validator to also be run. Per the docs:Note that this only happens if xsd-schema-validator has not been built yet - if it's last build failed or no attempt has been made to build it previously.
The only reason I'm trying to build a select list of modules is that I'm working on a monorepo where builds are disabled for regular
yarn install
(on a developer's machine) but are needed in other environments e.g. in Dockerfiles. Additionally, the Dockerfiles only build certain modules that are needed in the eventual container. There's currently no feature that allows building certain modules in certain environments - a combination ofenableScripts: false
anddependenciesMeta
only allows configuring a list of modules to build in all environments. Also, I'd prefer to not usedependenciesMeta
for a deny-list as that is not very maintainable.To reproduce
Playground
Output:
Environment
System: OS: Linux 5.4 Ubuntu 20.04.2 LTS (Focal Fossa) CPU: (4) x64 Intel(R) Core(TM) i7-5600U CPU @ 2.60GHz Binaries: Node: 14.15.1 - /tmp/xfs-2343c956/node Yarn: 3.0.0-rc.12.git.20210723.hash-b2a97475 - /tmp/xfs-2343c956/yarn npm: 6.14.8 - ~/.nvm/versions/node/v14.15.1/bin/npm
Additional context
No response