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 options to control if ".uid" files are generated #100973

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Daylily-Zeleen
Copy link
Contributor

@Daylily-Zeleen Daylily-Zeleen commented Dec 31, 2024

The main purpose of this pr is to allow not generate ".uid" files for "res://addons/", by setting "editor/resource/generate_uid_files_for_addons" to false in project settings.

Sometimes plugins are not included in version control system( for example, using gd-plug to reference plugins by single script), generate ".uid" for plugin's scripts and reference them by using uid are not reasonable.

Additionally, I add "editor/resource/generate_uid_files" to allow not generate ".uid" for the project, but default is true.
Generate ".uid" for each script make the file resource manager become ugly, and we should manipulate 2 files now.
There are some personal preferences here, I believe some people also have this feeling.
For old users, they should used drag files in editor's file system dock, it should not breaks the reference relationship by using this way, and uid is unreadable, we don't use them for coding directly.
In other words, ".uid" files are not necessary for some users.

@Daylily-Zeleen Daylily-Zeleen requested a review from a team as a code owner December 31, 2024 07:34
@AThousandShips AThousandShips changed the title Add options to control generate ".uid" files or not. Add options to control if ".uid" files are generated Dec 31, 2024
@JoNax97
Copy link
Contributor

JoNax97 commented Dec 31, 2024

I think Godot should commit one way or the other. Leaving this as an optional feature greatly limits it's potential in the future. All future features that build up from the uid system (or the metadata-companion-file concept in general) will be impossible to implement fully if some users don't have uids available.

@Chaosus Chaosus added this to the 4.x milestone Dec 31, 2024
@Daylily-Zeleen
Copy link
Contributor Author

Daylily-Zeleen commented Dec 31, 2024

@JoNax97 What features? You should provide specific situation to make your viewpoint convincing and solve the problem that I mentioned about (".uid" in "res://addons").

If you want to talk about future, to make plugins' detail files outside the version control system is a good future, too.
To be honest, plugin should be referenced like nuget in C# instead of including its detail files, right?

@JoNax97
Copy link
Contributor

JoNax97 commented Dec 31, 2024

I agree with you that add-ons should be handled via some package management system. But until then, we cannot guarantee that a plugin does or does not rely on uids and so it's not safe to disable them for all addons.

My main concern is not with add-ons specifically but in general. Fundamental mechanisms that the engine uses to manage its internals should not be up for disabling IMO.

@Daylily-Zeleen
Copy link
Contributor Author

Daylily-Zeleen commented Dec 31, 2024

I think I grab the point that you focus about.
Maybe we should just disable generate ".uid" in "res://addons/" for compatibility and enabled it for other directories.

We should make a decision before 4.4 release.

@AThousandShips
Copy link
Member

I don't think making UID files optional makes sense, it'd just be disabling an important and helpful feature and solves issues that people have been frustrated at for years, having them be optional just resets that and creates additional sources of bugs and frustration

Now there should be a proposal discussing how to handle UID files in addons, but regardless this PR needs a proposal, this shouldn't be discussed here as per the workflow guidelines, PRs are for discussing the implementation, proposals for discussing the idea

@Daylily-Zeleen
Copy link
Contributor Author

Daylily-Zeleen commented Jan 1, 2025

This pr can be superseded by #100994 now.


Here just talk about make the generate behavior become optional.

There have many remonstrances in #97352, even though it is merged, because not all people have spare time to focus each proposal and pr, they just pull and compile by themselves, and discovery the problem at this time.
We not disagree using uid to handle reference, we just hate it make the filesystem become ugly.
For old users, we can avoid break reference by using editor's file system dock, and we don't want when we actually need manage files outside editor, files become mess.

I very agree this comment.
And I prefer to intergrate all ".uid" into one file and add it to vcs, although it is even less reliable.

Anyway, I know this pr can't solve all problems and satisfy everyone, just provide a possible option to make godot reach to a good future.

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.

5 participants