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

Add Godot 3 to 4 conversion hints to errors in code editor when appropriate, reusing import tool #5865

Closed
lostminds opened this issue Nov 28, 2022 · 1 comment

Comments

@lostminds
Copy link

Describe the project you are working on

My first Godot 4 project

Describe the problem or limitation you are having in your project

Since most example code and snippets available are made for Godot 3 or earlier, figuring out how to do something new is now to me often a process of first finding a Godot 3 example code on how to do it, see if that still runs. If it doesn't check what API changes might be needed to get it to run. More often than not it's just simple renaming of properties (like get_font() to theme_get_font() etc). It's doable, but it could be nice if this was smoother.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add some hints in the editor or debugger on rows where there are errors to show suggested changes based on Godot 3->4 API changes, to help the user quickly convert and reuse old code snippets without needing to do another round of research in the docs or on the web.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

Since there's now a project import tool #387 implemented that I assume does code analysis and translation for exactly these same cases my proposal would be to reuse this to provide hints for individual rows in error messages. Either in the debugger or the editor errors.

For example, if there's an error like calling a method that doesn't exist or trying to access a property that doesn't exist, use the converter tool on the line of code to see if that would result in any changes. If it does, show this information as some sort of hint for the line with the issue, or maybe even a suggested conversion the user can apply with a single click.

If this enhancement will not be used often, can it be worked around with a few lines of script?

no

Is there a reason why this should be core and not an add-on in the asset library?

It would be an integrated feature of the debugger/compiler/editor but maybe it could be made an add-on as well.

@Calinou
Copy link
Member

Calinou commented Nov 28, 2022

Duplicate of #3902.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants