Problem/Motivation
Followup from #3262573-11: Update our yarn dev dependencies to the extent allowed by current constraints.
Currently, the commit check script has some very generic error messaging when yarn check -s exits with an error status:
# Ensure JavaScript development dependencies are installed.
yarn check -s 2>/dev/null
if [ "$?" -ne "0" ]; then
printf "Drupal's JavaScript development dependencies are not installed. Run 'yarn install' inside the core directory.\n"
DEPENDENCIES_NEED_INSTALLING=1;
fi
There are other reasons that yarn check -s can fail besides the dependencies not being installed. In particular, upstream issues or irresolvable conflicts can also cause the problem, e.g.:
[ayrton:core | Fri 17:31:33] $ yarn check -s
warning ../../../package.json: No license field
error "terser#acorn@^8.5.0" doesn't satisfy found match of "acorn@7.4.1"
warning "eslint#@babel/code-frame#@babel/highlight@^7.10.4" could be deduped from "7.16.10" to "@babel/highlight@7.16.10"
error Found 1 errors.Proposed resolution
Update the error message text to include other possible causes and solutions.
Remaining tasks
TBD
User interface changes
A change to the CLI and testbot output when yarn fails (not UI per se).
API changes
N/A
Data model changes
N/A
Release notes snippet
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | yarn-3267705.patch | 702 bytes | xjm |
Comments
Comment #2
xjmComment #4
longwaveShould we just remove
2>/dev/nullfrom here instead?yarn check -sonly prints output if there is a problem, so it would be useful to print it here if that is the case.Comment #5
xjmRe: #4, if it in fact is the case that the yarn dependencies aren't installed, then yarn "helpfully" prints an error message for each missing dependency. All 1300 of them. So I think we probably don't want to do that. ;)
Comment #7
xjmHEAD's a mess of random fails still, but the patch is NR.
Comment #9
xjmsrsly
Comment #10
longwaveThe new message is an improvement, but it would be nice if we could detect the different cases and tell the user exactly what to do.
Comment #13
lauriiiCommitted 78388a4 and pushed to 10.0.x. Committed to 9.4.x and 9.3.x since this only impacts the CLI output of our dev tooling. Thanks!