-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Suggest workaround if tsc --build
fails
#61501
Conversation
Following the merge of #60796, developers may face build issues that require package types to be rebuilt. The problem is that `tsc --build` fails somewhat silently -- or rather, there is some output, but it's not clear in the console which stage of the `build:package-types` command failed, and hence what the workaround should be. This commit alleviates the issue by logging a helpful message in the console if `tsc --build` fails: tsc failed. Try cleaning up first: `npm run clean:package-types`
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: 0 B Total Size: 1.74 MB ℹ️ View Unchanged
|
Thanks for the super quick review, @sirreal ! |
Squashed commit of the following: commit 40c0fd7 Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:55:56 2024 +0200 Patch react-autosize-textarea for updated types commit 69cf754 Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:48:37 2024 +0200 upgrade framer-motion commit b383044 Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:34:44 2024 +0200 Upgrade @use-gesture/react commit fdf93ae Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 18:32:11 2024 +0200 Go bonkers on the global vars commit cc43b8c Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 16:46:39 2024 +0200 Fix the process problem commit 548145e Author: Jon Surrell <sirreal@users.noreply.github.com> Date: Wed May 8 13:33:23 2024 +0200 No more skipLibCheck commit 1eb7644 Author: Miguel Fonseca <150562+mcsf@users.noreply.github.com> Date: Wed May 8 16:33:10 2024 +0100 build: Suggest workaround if `tsc --build` fails (#61501) Following the merge of #60796, developers may face build issues that require package types to be rebuilt. The problem is that `tsc --build` fails somewhat silently -- or rather, there is some output, but it's not clear in the console which stage of the `build:package-types` command failed, and hence what the workaround should be. This commit alleviates the issue by logging a helpful message in the console if `tsc --build` fails: tsc failed. Try cleaning up first: `npm run clean:package-types` commit 14ecb1d Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed May 8 09:49:20 2024 -0400 Bump actions/checkout from 4.1.4 to 4.1.5 in the github-actions group (#61449) Bumps the github-actions group with 1 update: [actions/checkout](https://github.com/actions/checkout). Updates `actions/checkout` from 4.1.4 to 4.1.5 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@0ad4b8f...44c2b7a) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: desrosj <desrosj@git.wordpress.org> commit e899475 Author: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Wed May 8 16:48:50 2024 +0300 RadioControl: Fix shrinking radio controls (#61476) Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> commit 839c17d Author: Riad Benguella <benguella@gmail.com> Date: Wed May 8 14:39:34 2024 +0100 Editor: Unify Header component. (#61273) Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jeryj <jeryj@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> commit 2c2f899 Author: Ella <4710635+ellatrix@users.noreply.github.com> Date: Wed May 8 20:30:44 2024 +0900 Revert "useBlockSync: remove isControlled effect" (#61480) Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: youknowriad <youknowriad@git.wordpress.org>
@draganescu and I just spent 10 mins figuring out what we did wrong staring at this screen. This screen runs a while so we thought we did something wrong, but in reality, everything works correctly. We misread the part of the command as an error Is there any chance we can make it less visible? Maybe hiding it in a sub-command file? |
Yeah, agreed, as I was working on this, it bugged me too that the script's entire expression is logged by NPM. I thought of creating a script to encapsulate the error clause, but I told myself that was a bit "too much" and that I was the only one bothered. But thanks to you I feel validated. ;) Maybe I'll do that now. |
Follows up on #61501. The original PR, #61501, modified the `build:package-types` script to log a help message to developers if the `tsc --build` call failed. This message suggested a fix (to run `npm run clean:package-types`). This works, but due to the way that NPM logs the execution of successive NPM scripts, the code that conditionally outputs the help message is, itself, always output. This is not only noisy, but could mislead developers into following the help message's instruction unnecessarily. This commit fixes the problem by wrapping the original NPM script in a new script, which is then called with NPM's `--silent` flag. The console output now looks like this: > gutenberg@18.3.0 build:packages > npm run build:package-types && node ./bin/packages/build.js > gutenberg@18.3.0 build:package-types > npm run --silent build:package-types:verbose
|
Follows up on #61501. The original PR, #61501, modified the `build:package-types` script to log a help message to developers if the `tsc --build` call failed. This message suggested a fix (to run `npm run clean:package-types`). This works, but due to the way that NPM logs the execution of successive NPM scripts, the code that conditionally outputs the help message is, itself, always output. This is not only noisy, but could mislead developers into following the help message's instruction unnecessarily. This commit fixes the problem by wrapping the original NPM script in a new script, which is then called with NPM's `--silent` flag. The console output now looks like this: > gutenberg@18.3.0 build:packages > npm run build:package-types && node ./bin/packages/build.js > gutenberg@18.3.0 build:package-types > npm run --silent build:package-types:verbose
Following the merge of #60796, developers may face build issues that require package types to be rebuilt. The problem is that
tsc --build
fails somewhat silently — or rather, there is some output, but it's not clear in the console which stage of thebuild:package-types
command failed, and hence what the workaround should be.This pull request alleviates the issue by logging a helpful message in the console if
tsc --build
fails: