Skip to content

fix(demos): Update code demo to use new script import names for generators - #7213

Merged
cpcallen merged 1 commit into
RaspberryPiFoundation:developfrom
cpcallen:fix/demos
Jun 27, 2023
Merged

fix(demos): Update code demo to use new script import names for generators#7213
cpcallen merged 1 commit into
RaspberryPiFoundation:developfrom
cpcallen:fix/demos

Conversation

@cpcallen

Copy link
Copy Markdown
Collaborator

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

Resolves

Fixes errors in Code.checkAllGeneratorFunctionsDefined caused by the breaking change in PR #7150, implementing the .forBlock dictionary.

Proposed Changes

  • Update the demos/code/ demo to use the new import names (e.g. BlocklyJavaScript -> javascript.javascriptGenerator.
  • Fix Code.checkAllGeneratorFunctionsDefined by having it use .forBlocks dictionary.

Behaviour Before Change

Code generation fails with dialog warning about missing generator functions.

Behaviour After Change

Code generation works.

Reason for Changes

Keep code functional and up-to-date.

Test Coverage

Manually tested.

This is mostly just chore updating to the new import names
(e.g. BlocklyJavaScript -> javascript.javascriptGenerator),
but the change to Code.checkAllGeneratorFunctionsDefined is
a necessary fix due to the breaking change in PR RaspberryPiFoundation#7150,
implementing the .forBlock dictionary.
@cpcallen
cpcallen requested a review from a team as a code ownerJune 27, 2023 15:52
@cpcallen
cpcallen requested a review from maribethbJune 27, 2023 15:52
@github-actionsgithub-actionsBot added PR: fix Fixes a bug and removed PR: fix Fixes a bug labels Jun 27, 2023
@cpcallen
cpcallen merged commit e49c028 into RaspberryPiFoundation:developJun 27, 2023
@cpcallen
cpcallen deleted the fix/demos branch June 27, 2023 16:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR: fixFixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@cpcallen@BeksOmega@maribethb