Skip to content
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

chore(build,tests): Remove obsolete kludges / config options #6835

Merged
merged 2 commits into from
Feb 8, 2023

Conversation

cpcallen
Copy link
Contributor

@cpcallen cpcallen commented Feb 8, 2023

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Proposed Changes

Remove circular import loading issue kludge

Prior to PR #6818, circular imports resulted in the debug module loader (in closure/goog/base.js) failing to record the
goog.module ID of most modules that were involved in any cycle, and in particular of the Blockly.Xml module. This had secondary fallout that resulted in library blocks modules being loaded in the wrong order.

A kludge was introduced in PR #6703 that worked around this problem by making sure that window.Blockly was set, allowing the modules loaded out-of-order to still work.

Now that we have removed all remaining circular dependencies there is no need for the kludge, since all module IDs are properly recorded and modules are loaded in the correct order.

Remove exclude for non-existent core/blockly.js from tsconfig.js

There was a transitional period where we had both core/blockly.ts and core/blockly.js, and wished to exclude
the latter from tsc's input, but that file was deleted (and inadvertently restored, then re-deleted) some time ago.

Reason for Changes

Cleanup.

Test Coverage

Passes npm test; playground loads correctly. No manual test changes anticipated.

Prior to PR google#6818, circular imports resulted in the debug module
loader (in closure/goog/base.js) failing to record the
goog.module ID of most modules that were
involved in the cycle, and in particular of the Blockly.Xml
module.  This had secondary fallout that resulted
in library blocks modules being loaded in the wrong order.

A kludge was introduced in PR google#6703 that worked around this
problem by making sure that window.Blockly was set, allowing
the modules loaded out-of-order to still work.

Now that we have removed all remaining circular dependencies
there is no need for the kludge, since all module IDs are
properly recorded and modules are loaded in the correct order.
There was a transitional period where we had both
core/blockly.ts and core/blockly.js, and wished to exclude
the latter from tsc's input, but the latter file was deleted
(and inadvertently restored, then re-deleted) some time ago.
@cpcallen cpcallen added component: tests component: build process PR: chore General chores (dependencies, typos, etc) labels Feb 8, 2023
@cpcallen cpcallen requested a review from NeilFraser February 8, 2023 10:36
@cpcallen cpcallen requested a review from a team as a code owner February 8, 2023 10:36
@cpcallen cpcallen enabled auto-merge (squash) February 8, 2023 10:36
@cpcallen cpcallen changed the title Chore/rm kludge chore(build,tests): Remove obsolete kludges / config options Feb 8, 2023
@github-actions github-actions bot added PR: chore General chores (dependencies, typos, etc) and removed PR: chore General chores (dependencies, typos, etc) labels Feb 8, 2023
@cpcallen cpcallen disabled auto-merge February 8, 2023 10:45
@cpcallen cpcallen enabled auto-merge (squash) February 8, 2023 10:46
@cpcallen cpcallen merged commit d83dcfb into google:develop Feb 8, 2023
@cpcallen cpcallen deleted the chore/rm-kludge branch February 8, 2023 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: build process component: tests PR: chore General chores (dependencies, typos, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants