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

Remove obsolete/undefined Editor and Project settings #4444

Open
KoBeWi opened this issue Apr 24, 2022 · 3 comments
Open

Remove obsolete/undefined Editor and Project settings #4444

KoBeWi opened this issue Apr 24, 2022 · 3 comments

Comments

@KoBeWi
Copy link
Member

KoBeWi commented Apr 24, 2022

Describe the project you are working on

Godot, games etc (not really relevant)

Describe the problem or limitation you are having in your project

Original proposal:

Currently when we rename editor or project settings in a given version, users upgrading from the previous version will still see those obsolete properties in their editor/project settings if they were saved in their editor_settings-3.tres/project.godot.
This is confusing as users may expect those to still do what their name says, even though they have actually no impact on their project whatsoever.
The same issue arises when using a non-Mono build after using a Mono build, where Mono-specific properties will be exposed in the editor settings.
Such properties are not identified as obsolete nor custom for now, the only hint you have is that there is a revert button and that reverting them makes them disappear (!).
I suggest to identify them visually, maybe by having them in italics, and/or with a warning popup (similar to node configuration warnings) that tells that they are either no more applicable settings from an other version of Godot, or user-defined settings.

However the proposal didn't gain too much support and my comment about adding a button to remove such properties (instead of graying out or whatever) gained almost as much upvotes.

It was suggested in #3526 (comment) to open a counter-proposal, so here it is.

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

Whenever Godot encounters some unknown project or editor setting upon startup, yeet it. There is no reason to keep them and they cause problems, as described above.

The only usage for custom project settings would be making a setting and then adding overrides based on platform. But this can be done in code as well.

Alternative option to removing is to hide such settings from the settings dialog. This could be useful for settings dependent on current editor build, but idk if we have such settings (maybe for mono?).

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

When project loads, Godot would check all saved project settings and editor settings and compare them with some table of defined, known settings. Not sure if making such table is possible right now, as the settings are actually defined all over the code with EDITOR_SET and GLOBAL_SET. We might need to centralize it first.

If a setting is not in the table, yeet. (or hide, without modifying the settings file)

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

Technically doable with a plugin, but this should be in editor.

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

Editor and project settings are part of editor.

@Mickeon
Copy link

Mickeon commented Apr 25, 2022

I think this would especially make sense between the transition from 3.x to 4.0. I have a feel this may be unexpected behaviour if completely automatic on startup, however.

@Calinou Calinou added the breaks compat Proposal will inevitably break compatibility label May 15, 2022
@Calinou Calinou added this to the 4.0 milestone May 15, 2022
@Flavelius
Copy link

While it's not directly related a similar issue with obsolete/leftover entries also exists in tscn/tres files (godotengine/godot#47253), so i think it's worth rethinking how the engine deals with this in general.

@RedMser
Copy link

RedMser commented May 28, 2024

Whenever Godot encounters some unknown project or editor setting upon startup, yeet it.

This would also remove settings created by a GDExtension which failed to load. I'm more in favor of hiding or visually highlighting unknown settings, and having an explicit list of deprecated settings in the editor which are automatically migrated (and/or just delete them without touching anything else).

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

5 participants