Blockly v11 Beta Program: v11.0.0-beta.0

84 views
Skip to first unread message

Christopher Allen

unread,
Dec 23, 2023, 6:48:15 PM12/23/23
to blo...@googlegroups.com
This is the first in what we expect will be a series of beta releases for the future v11 of Blockly.

Blockly v11 Beta Program

We have a fairly large backlog of breaking changes that we've been holding on to, and we are planning to publish a series of betas ad hoc as those changes are finished and ready for you to test. We want to get these out to you as soon as possible, for two reasons:

  • So that you can prepare modifications to your projects as required in response to the breaking changes we're planning to include in v11.
  • So that you can give us early feedback about issues you encounter. We're interested in reports of any kind of bug, of course, but we're especially interested in hearing if a breaking change we're planning for v11 turns out to create intractable difficulties in upgrading your project(s).

It is quite likely that work on Blockly v10, including backwards-compatible bug fixes and/or new features, will continue in parallel with work on the less backwards-compatible changes we're planning for v11. We expect that in most cases each v11 beta will be up-to-date with all the latest v10 updates, but we can't make any such guarantees. As such, you should continue using v10 in production, since bugs will get fixed in v10 first, and v11 will probably introduce exciting new bugs—though with your help we hope to fix most of them before v11.0.0 is officially released.

Highlights in v11.0.0-beta.0

The only breaking change in this release is that we're finally publishing accurate TypeScript typings for the generators! 🎉

The generators were migrated to TypeScript in v10.3.0, concluding our work to migrate the core Blockly codebase from JavaScript to TypeScript. The new TypeScript implementation is (intended to be) functionally the same but a change in published typings is likely to break existing projects; to avoid this we opted to continued to publish the same hand-written .d.ts files for the generator entrypoints (e.g. blockly/javascript) that we have been using until now.

Previously the dartGeneratorluaGeneratorjavascriptGeneratorphpGenerator, and pythonGenerator exports (from the blockly/dartblockly/luablockly/javascriptblockly/php and blockly/python entrypoints respectively) were being typed any.
(In hindsight we should probably have declared them as unknown, obliging TS developers to use explicit casts.) Now their types are correct. There is no change to their runtime behaviour, but developers who have written code in TypeScript that manipulates generators (adding custom block generator functions, for example) may find they need to correct type errors in their code in order for it to compile correctly with Blockly v11.

Notably, block generator functions to be installed in the javascriptGenerator.forBlock dictionary should be typed

(block: Blockly.Block, generator: javascript.JavascriptGenerator) => [string, javascript.Order] | string | null

—and similarly for each of the other four languages we support.

Note that in most cases the return type for any particular generator function can be either [string, javascriptOrder] (for expression blocks), string (for statement blocks), or null (for blocks that do not directly emit code).

What's Changed

Breaking changes 🛠

Bug fixes 🐛

  • fix: Remove double spaces in translation instructions. by @NeilFraser in #7704
  • fix: updated mocha tests to display error messages by @btw17 in #7706
  • fix: prevent flyout block highlighting during workspace drag by @neerajkumarc in #7720

New Contributors

Full Changelogblockly-v10.3.0...blockly-v11.0.0-beta.0

Christopher Allen

unread,
Jan 9, 2024, 12:13:33 PMJan 9
to blockly-...@googlegroups.com
[This was posted in the Blockly forum yesterday but I forgot to CC: blockly-announce.  Apologies to those of you who have already seen it.]

This is the second in what we expect will be a series of beta releases for the future v11 of Blockly. See information about the Blockly v11 Beta Program.

Highlights in v11.0.0-beta.1

The only new change in -beta.1 is a fix for an issue reported about the new generator type declarations in -beta.0. Thanks to @clementcontet for spotting and reporting this error!

What's Changed

Bug fixes 🐛

  • fix(generators): Fix generator type declarations by @cpcallen in #7750

Full Changelogblockly-v11.0.0-beta.0...blockly-v11.0.0-beta.1

Reply all
Reply to author
Forward
0 new messages