bootstrapworld / pyret-blocks

Block Language for the Pyret Programming Language
Apache License 2.0
3 stars 1 forks source link

All DropTargets must include field names for proper validation #27

Closed schanzer closed 3 years ago

schanzer commented 3 years ago

CMB requires that every dropTarget include a field property, which tells CMB which field in the containing block is associated with that target. Previously, the production version of CMB stripped out these warnings, which is why no one noticed the problem. This has now been fixed, and we get warnings...all the time. :)

Without these fields, CMB has no way to know what to do update, so sometimes updates appear to be no-ops. Other times, they might update the wrong field, or more than one! (See #21 and #19)

The solution is to go through the custom AST nodes in src/languages/pyret/ast.tsx, and make sure every target has a field.