-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
refactor(build): Delete Closure Library #7415
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was deleted in PR google#7406 as it was mainly being used to filter core/ vs. test/mocha/ deps into separate deps files - but it turns out also to be used for filtering error messages too. Oops.
This turns out to be pretty straight forward, even if it would cause crashing if one actually tried to import this module instead of just feeding it to Closure Compiler.
Replace goog.declareModuleId calls with a comment recording the former module ID for posterity (or at least until we decide how to reformat the renamings file.
For the moment we still need something to serve as base.js for the benefit of closure-make-deps, so we keep a vestigial base.js around, containing only the @provideGoog declaration.
By changing slightly the command line arguments to closure-make-deps and closure-calculate-chunks the need to have any base.js is eliminated.
cpcallen
requested review from
rachel-fenichel
and removed request for
BeksOmega
August 20, 2023 01:13
rachel-fenichel
approved these changes
Aug 21, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The basics
The details
Resolves
Almost finishes resolving #6858.
Proposed Changes
Restore erroneously-deleted
filter
function inbuildDeps
.This was deleted in PR refactor(tests): Use
import
instead ofgoog.bootstrap
to load Blockly in mocha tests #7406 as it was mainly being used to filtercore/
vs.test/mocha/
deps into separate deps files—but it turns out also to be used for filtering error messages too. Oops.Migrate advanced compilation test to ES Modules
Migrate
main.js
to TypeScript.This turns out to be pretty straight forward, even if it would cause crashing if one actually tried to import this module instead of just feeding it to Closure Compiler.
Remove
goog.declareModuleId
calls.Replace each one with a comment recording the former module ID for posterity (or at least until we decide how to reformat the renamings file.
Delete
closure/goog/*
By changing slightly the command line arguments to
closure-make-deps
andclosure-calculate-chunks
, even the need to have a vestigialbase.js
contianing only@declareGoog
is eliminated.Behaviour Before Change
core/base.js
usedgoog.require
to obtain their dependencies.closure-make-deps
andclosure-calculate-chunks
depended on the existence of abase.js
file, containing a@declareGoog
JSDoc directive.Behaviour After Change
main.ts
are ES and TS modules respectively, usingimport
to get their dependencies.closure-make-deps
andclosure-calculate-chunks
do not need anybase.js
.Reason for Changes
Eliminate code we no longer need. Make it possible to build Blockly using webpack or another minifier that's not Closure Compiler.
Test Coverage
Passes
npm test
.Additional Information
This PR depends upon #7414 in order to pass tests. Once #7414 is merged, this PR must be rebased onto
develop
or havedevelop
merged in.