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

fix(migration): Ignore non-renamed modules #2309

Merged
merged 2 commits into from
Apr 5, 2024
Merged

fix(migration): Ignore non-renamed modules #2309

merged 2 commits into from
Apr 5, 2024

Conversation

cpcallen
Copy link
Contributor

@cpcallen cpcallen commented Apr 4, 2024

The basics

The details

Resolves

Fixes #2171.

Proposed Changes

Don't create a renaming entry for modules that haven't been renamed.

Add an entry to the test renamings that replicates the situation describe in #2171, and which causes multiple test failures without the aforementioned fix.

Additional Information

We should probably do a prefix sort on .renamings_ (or even just sort by length descending), so that more specific entries precede less-specific ones, but after thinking quite hard about the possible consequences of this I wasn't 100% sure that this wouldn't have unforeseen consequences due to the (arguably excessive) complexity of how renamings are specified.

Since the renaming file (and therefore script) is due for a rethink anyway—since it is keyed on goog.module IDs that no longer actually exist in the Blockly sourcecode—I think doing the simplest possible thing for now is probably the best approach.

@cpcallen cpcallen added the category: plugin Anything in the plugins folder label Apr 4, 2024
@cpcallen cpcallen requested a review from a team as a code owner April 4, 2024 16:11
@cpcallen cpcallen requested review from maribethb and removed request for a team April 4, 2024 16:11
Copy link
Contributor

@maribethb maribethb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also needs formatting, then lgtm

plugins/migration/bin/rename.js Outdated Show resolved Hide resolved
@cpcallen cpcallen merged commit 8c8b04d into master Apr 5, 2024
9 of 10 checks passed
@cpcallen cpcallen deleted the fix/2171 branch April 5, 2024 09:39
gonfunko pushed a commit to gonfunko/blockly-samples that referenced this pull request Apr 15, 2024
* fix(migration): Ignore non-renamed modules
  + add a test for this.

* chore(migration): Remove log statement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: plugin Anything in the plugins folder
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration script includes 'Blockly' -> 'Blockly' rename, causing the script to exit early
2 participants