Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Null Constant Usage in Blockly Logic Blocks and Test #1673

Open
alvaro555 opened this issue Jul 10, 2024 · 2 comments
Open

Refactor Null Constant Usage in Blockly Logic Blocks and Test #1673

alvaro555 opened this issue Jul 10, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@alvaro555
Copy link
Collaborator

Describe the bug
The null constant was previously used inappropriately in the Integration test, specifically in listOperationsBasic the block "in list X find first occurrence of item Y" (IndexOfFunct) . Although this specific issue has been resolved, there is a need to move the null constant from logic blocks and change its color to pink to correctly represent connection types. Additionally, the null constant should be removed from any tests that do not involve connection types or are used incorrectly.

Additional context
This issue was discovered because of the TypecheckCommonLanguageVisitor, which currently works with microbitv2, ev3, and WeDo.

@alvaro555 alvaro555 added blockly bug Something isn't working labels Jul 10, 2024
@bjost2s bjost2s removed the blockly label Jul 11, 2024
@bjost2s bjost2s self-assigned this Jul 11, 2024
@bjost2s bjost2s moved this from Todo to In Progress in Release 5.2.18 Jul 11, 2024
@bjost2s
Copy link
Contributor

bjost2s commented Jul 11, 2024

The null constant is more widely usable, here are the definitions of possible types (from blockly, not only "connection"):
"output": ["Connection", "String", "Array_Boolean", "Array_Colour", "Array_Connection", "Array_Number", "Array_String"],

and here is a full list of toolboxes using it:
image
@alvaro555, let's discuss the next steps together

@bjost2s bjost2s moved this from In Progress to Todo in Release 5.2.18 Jul 11, 2024
@rbudde
Copy link
Contributor

rbudde commented Jul 12, 2024

btw: null is used inconsistently in blockly. You may create an array with null, but you cant update the array with null. The block which refers to the lists name ("l") jumps out of the set block. Assigning a string does work.
null-error

@bjost2s bjost2s removed this from Release 5.2.18 Jul 15, 2024
@bjost2s bjost2s added this to Backlog Jul 15, 2024
@bjost2s bjost2s moved this to Todo in Backlog Oct 25, 2024
@bjost2s bjost2s removed their assignment Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

3 participants