-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Create .editorconfig
file only on project creation
#97270
Conversation
5bbf489
to
f84cc4d
Compare
.editorconfig
file on project creation.editorconfig
file on project creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me. Yes, this doesn't fix the Visual Studio issue retroactively for existing projects, but it's probably better to let users decide whether they need .editorconfig
or not.
Also please remove the following lines:
godot/modules/gdscript/tests/scripts/.editorconfig
Lines 1 to 2 in 5ccbf6e
# This file is required to workaround `.editorconfig` autogeneration (see #96845). | |
const String editor_config_path = path.path_join(".editorconfig"); | ||
Ref<FileAccess> f = FileAccess::open(editor_config_path, FileAccess::WRITE); | ||
if (f.is_null()) { | ||
ERR_FAIL_MSG("Couldn't create .editorconfig in project path."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should use ERR_PRINT
instead? .editorconfig
isn't so critical and EditorVCSInterface::create_vcs_metadata_files()
result is also not checked.
I agree with changing this to a project creation step. I'm not fully sold with the UI though, this dialog is already heavy and adding more checkboxes and labels really makes information overload IMO. It might also be an issue on the Android editor where the dialog might again become too tall for screens in landscape mode. We might need to rethink this UI a bit, CC @Calinou @KoBeWi. I'm fine with merging this as a first step and have others rework the UX later. |
There are a couple of options I can think of, if we don't want the dialog to be too high:
|
Not sure if I see any reason for making it optional. It's tiny. And Also, adding this option might create a false impression that Godot supports reading and using |
@bruvzg I think we could hide the option from the project creation dialog for now and create the file without asking. But in my opinion it still makes sense to move this step to project creation. Since the inability to delete the file permanently seems to be annoying for some users. And it also has a small chance of unexpected issues in projects. Not sure if it's related but there is |
I agree with not making it optional, but having it only on project creation. Forcefully creating the file when editing pre-existing projects was indeed a concern of mine, and we've indeed see it appearing in unexpected places, like the GDScript test suite. If some users ask for it, we could later add an editor setting to configure whether to create it, or expose it to the project creation dialog, but for now I think we can consider this is part of the new default files for a Godot project. |
f84cc4d
to
94980c4
Compare
94980c4
to
8086894
Compare
.editorconfig
file on project creation.editorconfig
file only on project creation
Done. This PR now moves |
Thanks! |
See also the previous discussion here: #96845 (comment) |
Instead of always generating one when missing, this PR creates
.editorconfig
on project creation.