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

It is possible to have a caller block inconsistent to its definition #5971

Closed
gpfernandezflorio opened this issue Mar 2, 2022 · 3 comments
Closed
Assignees
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@gpfernandezflorio
Copy link
Contributor

Describe the bug

Taking a block from the trashcan allows you to have a caller block inconsistent to its definition.

To Reproduce

Steps to reproduce the behavior:

  1. Create a procedure definition.
    image
  2. Create and delete a caller for that procedure
    image
  3. Add a parameter to the procedure
    image
  4. Open the trashcan and add the caller to the workspace
    image

Expected behavior

Not sure. I guess the caller should mutate to be consistent to it's definition.
Another option could be that it renames to a new procedure.

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome v98.0.4758.102
@gpfernandezflorio gpfernandezflorio added the issue: triage Issues awaiting triage by a Blockly team member label Mar 2, 2022
@alschmiedt alschmiedt added issue: bug Describes why the code or behaviour is wrong and removed issue: triage Issues awaiting triage by a Blockly team member labels Mar 2, 2022
@alschmiedt alschmiedt added this to the Bug Bash Backlog milestone Mar 2, 2022
@alschmiedt
Copy link
Contributor

Thanks for reporting! I think the first option where the caller mutates makes the most sense to me (it is similar to what we do in the flyout). Just a heads up we are unlikely to get this out for the upcoming release in a couple of weeks, but we always accept PRs if you are interested in contributing : )

@BeksOmega BeksOmega self-assigned this Mar 21, 2022
@BeksOmega
Copy link
Collaborator

I don't think this is a problem specific to the trashcan. It can also occur when you paste a copied caller into the workspace:
https://imgur.com/qywiPYR

Ideally the pasted block would mutate to match the procedure def, but callers don't save the UUID of the block definition, only the name, which can change, so that behavior isn't possible. I think the correct behavior is for the newly pasted caller to have its name change to match the generated procedure definition. I think would should be able to add that here.

@BeksOmega
Copy link
Collaborator

Closed by #6014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

No branches or pull requests

3 participants