Skip to content

2.0 custom procedure calls get imported with extra block #1011

Closed
@kchadha

Description

@kchadha

When custom procedure calls that have number or string inputs are imported from Scratch 2.0, an extra (orphan/unreachable) shadow block is created. This block (with opcode text or math_number) has a reference to the procedure call block as its parent, but the original procedure_call block doesn't have any reference to this block (it references a different text/math_number block as its shadow instead). This creates problems during project validation as there shouldn't be unreferenced text/math_number blocks at the top level since they're actually only used as fields of other blocks.

Take as an example, this minimum repro project:

image

When we load this project into 3.0 from a 2.0 project, we see the following in the Sprites' blocks:

image

When we create this project from scratch in 3.0, we see the following in the Sprite's blocks:

image

Notice that there's an extra block with opcode 'text' in the imported project vs. the 3.0 project.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions