fromSb3: Peculiarity with pen_menu_colorParam as shadow input (etc?) #144
Labels
bug
Something isn't working
compatibility
Mismatch or currently unsupported language behavior
fmt: SB3
Pertains to SB3 format (Scratch 3.0)
Investigating #141.
The basic processing for shadow inputs is to copy the inputs and fields of a shadow input into the parent block:
This is usually good enough, but there can be discrepancies between the names of inputs/fields on a shadow input and inputs/fields on the parent block. These need to be handled manually and aren't detected by TypeScript.
One such came up with
pen_menu_colorParam
, which has a strangely camelCased field:pen_menu_colorParam
is a CONSTANT_CASED input on two blocks:This results in
COLOR_PARAM
being undefined (possibly only in certain project.json scenarios), which breaks output formats that expect it to be there. Also a surprisecolorParam
input existing, of course, which isn't referenced by any output formats (it's not part of the sb-edit intermediate representation).It would be nice if TypeScript could flag cases like this automatically. Right now
inputPrimitiveOrShadowMap
isn't typed at all, so it looks like some work could be done here.The text was updated successfully, but these errors were encountered: