Skip to content

Conversation

@cpcallen
Copy link
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

Part of #6828.

const quarkId: string = this.quarkIds_[i]; // TODO(#6920)
if (quarkId in this.quarkConnections_) {
const connection = this.quarkConnections_[quarkId];
// TODO(#6920): investigate claimed circular initialisers.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does "circular intialisers" refer to?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

From #6920:

setProcedureParameters_ unexpectedly required declarations of the types of the quarkId and connection local variables avoid "implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer" errors. Since the definitions do not appear to be circular (though connection is initialised based on quarkId) this smells and probably warrants further investigation.

// Hack: override showEditor to do just a little bit more work.
// We don't have a good place to hook into the start of a text edit.
field.oldShowEditorFn_ = field.showEditor_;
field.oldShowEditorFn_ = (field as AnyDuringMigration).showEditor_;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a TODO comment pointing at #6920 for this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I could, but #6920 already mentions use of as, and I had been treating the "DuringMigration" part as making it implicitly clear that it was not OK.

I've added a note to #6920 to check for AnyDuringMigration in particular, though.

cpcallen added a commit to cpcallen/blockly that referenced this pull request Jun 21, 2023
(Replaces an earlier commit that inadvertently introduced a
syntax error.)
@cpcallen cpcallen force-pushed the fix/6828/blocks/procedures branch from 2ebe4a0 to 46bbd87 Compare June 21, 2023 19:12
@cpcallen cpcallen merged commit ec71261 into RaspberryPiFoundation:develop Jun 21, 2023
@cpcallen cpcallen deleted the fix/6828/blocks/procedures branch June 21, 2023 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update BlockDefinition type import in block definition files

3 participants