Skip to content

chore: pull build and test-compile-advanced task out of gulp - #10546

Draft
lizschwab wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
lizschwab:degulpify-build-task
Draft

lizschwab wants to merge 1 commit into
RaspberryPiFoundation:mainfrom
lizschwab:degulpify-build-task

Conversation

@lizschwab

Copy link
Copy Markdown
Contributor

The basics

The details

Resolves

Moves the build and test-compile-advanced tasks off of gulp and into node-based scripts.

Proposed Changes

  • Remove build, minify, and buildAdvancedCompilationTest gulp tasks
  • Remove minify script, which was made redundant when we restructured the build task and moved tsc and langfiles scripts onto the npm commands (see chore: move tsc command off gulp #10519 and chore: move langfiles and messages off gulp #10522)
  • Delete scripts/gulpfiles/build_tasks.mjs
  • Add new node-based scripts, scripts/build.mjs and tests/compile/test_compile_advanced.mjs
  • Noteable change: we are no longer stripping licenses on the test compile; this is not necessary
  • Note that the results of the test_compile_advanced.mjs do differ from the original output; this is due to differences in how the different versions of the closure compiler differing in how they build out their lists when using the ADVANCED_OPTIMIZATIONS. As this is only a test and the test is passing as expected, we don't need to be concerned about this change.
  • A couple of nx configurations were cleaned up.

Reason for Changes

Removing dependency on gulp

Test Coverage

I validated these changes by doing the following:

  • Running a diff between the contents of the /dist folder after gulp version of the build command and after the new node command
  • Running a plugin locally against the compressed files to ensure the sourcemaps work correctly (to test this yourself, you can update the webpack.config.js from devtool: isProduction ? 'source-map' : 'eval-source-map', to devtool: 'source-map')
  • Running through various permutations of npm ci, npm run build, npm run test, npm run lint, and npm run format in addition to running each test script individually and running each changed script individually to ensure they work consistently and as expected.

Additional Information

AI was used to build out the function that calls the google-closure-compiler to make the output identical to the old gulp output to give us high confidence in the output. It was also used to help debug some issues encountered during testing. All changes were verified by a human and thoroughly vetted against the gulp version of the output of these tasks.

@github-actions github-actions Bot added the PR: chore General chores (dependencies, typos, etc) label Sep 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: chore General chores (dependencies, typos, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant