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

Renaming an extension can break an action inside its events #5563

Open
1 task done
4ian opened this issue Aug 13, 2023 · 1 comment
Open
1 task done

Renaming an extension can break an action inside its events #5563

4ian opened this issue Aug 13, 2023 · 1 comment

Comments

@4ian
Copy link
Owner

4ian commented Aug 13, 2023

Is there an existing issue for this?

Describe the bug

Seems like a "refactoring" is not done properly when we rename an extension.

Steps to reproduce

  1. Open Tappy Plane example.
  2. Rename the extension "PanelSpriteButton" to something else:
    image
  3. In the object of the extension, in the doStepPostEvents, observe how an action is now not found anymore:
    image

GDevelop platform

Desktop, Web

GDevelop version

5.2.169

Platform info

No response

Additional context

cc @D8H

@D8H
Copy link
Collaborator

D8H commented Aug 14, 2023

  • The "scale" action with the issue is automagically declared by the ProjectBrowserHelper for event-based objects.
  • WholeProjectRefactorer applies a rename refactor for each user-defined functions independently.

Thus, instructions that are automatically declared on event-based object are not refactored. I think that doing the refactor for each of these instructions specifically would be a bit weak because it would break each time the declaration is changed.

Do you think we should rather apply a global rename refactor that replaces any MyExtension:: prefix in instruction types?

Note that capabilities will solve the issue for most of these instructions, but maybe not all of them (nor the ones that may be added in the future)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants