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

Use minor version in EditorSettings file name #90875

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

KoBeWi
Copy link
Member

@KoBeWi KoBeWi commented Apr 18, 2024

When switching between different Godot minor versions, due to shifting defaults or changing shortcuts, there is a risk of losing data saved in editor settings. The most prominent case is the newest format change in 4.3, which causes the settings file to be "corrupted" in older versions, resulting in complete reset.

This PR adds a minor version to settings name, so now it's editor_settings-4.3.tres and so on. When opening new version for the first time, the editor will automatically search for older settings and migrate them.

Bugsquad edit:

@KoBeWi KoBeWi added this to the 4.3 milestone Apr 18, 2024
@KoBeWi KoBeWi requested a review from a team as a code owner April 18, 2024 22:13
@zaevi
Copy link
Contributor

zaevi commented Apr 19, 2024

While it will migrate settings from older versions, the settings are independent for each minor version after the migration. If I change the editor settings in a new version (e.g., 4.4), the older (4.3) will still need to change again.

Is it possible to share the same editor_setting file for 4.3~4.x?

@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 19, 2024

Is it possible to share the same editor_setting file for 4.3~4.x?

It's possible, but I explained why it's better to not do that. Even before format change I had settings disappearing when downgrading and eventually I started running every version in self-contained mode. I don't see how it's desirable.

@zaevi
Copy link
Contributor

zaevi commented Apr 19, 2024

Even before format change I had settings disappearing when downgrading

Not really, from 4.0 to 4.3.dev5, almost all editor settings are retained when downgrading, except for those newly added properties. That's why I want them to share the same one.

@KoBeWi
Copy link
Member Author

KoBeWi commented Apr 19, 2024

4.2 -> 4.3 for example changed text_editor/completion/add_type_hints default, so if you go back to 4.2, you will have it disabled.
There is also the Duplicate Selected shortcut that changed 3 times already, so if you customize it to any former defaults, it will be gone.
Make Unique Sub-resources shortcut has no default, but it used to be bugged, so if you set it and go back to a bugged version, it will be gone.
There are more examples of random things like that and when you move between versions you will only discover that something is wrong when you try to use a functionality and notice that it behaves differently than you customized it.

Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

I agree with this approach, we've had a few issues due to reusing the same file across minor releases, and this will grow as the 4.x series keeps getting more and more features.

@akien-mga akien-mga merged commit ba804f1 into godotengine:master Apr 23, 2024
16 checks passed
@KoBeWi KoBeWi deleted the minor_problem branch April 23, 2024 17:19
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

Editor settings wiped out when going from latest 4.3.dev to older releases
3 participants