-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
GDScript: Add exclude_addons_exceptions
project setting
#93889
base: master
Are you sure you want to change the base?
GDScript: Add exclude_addons_exceptions
project setting
#93889
Conversation
Bit of an iffy spot to use raw file paths to the I get we are extremely limited when it comes to UI design here, but this kind of setting would make a whole lot more sense if it was available in the Addons tab as a toggle for each addon, instead. Problem is, this is a bit too specific to deserve a special column, and hiding it behind an "Others" secion would make it too obscure. I think it would feel a whole lot more natural, beneficial, and encompassing to have both an exclusion list (blacklist) and inclusion list (whitelist, or exceptions as by this PR) of folder/file paths where warnings can apply. |
@Mickeon I thought about both options and initially implemented the Debug column in the Plugins tab. But after some thought, I decided that this was an overcomplication. You have only two types of code in your project: your own (including some plugins) and third-party. For your own code, you should stick to a consistent style and warning configuration. If you want to suppress some warnings at the individual file level, there is The option of excluding arbitrary folders or |
23b7636
to
a6211d0
Compare
From a UX perspective, plugins created through the create plugin wizard should be added to this setting automatically, since they are obviously code of the current user. Also I'd only show the note in the configuration dialog, when the plugin is not on the list, otherwise users might make an unnecessary trip to the settings just to find the plugin already configured. |
@HolonProduction Thanks for the comment! I thought about this option, but there are a few questions we should discuss first:
|
|
Hi I opened one of the feature requests that is listed as being closed by this change. If I am understanding correctly, this change is actually the inverse of what I was requesting. I would like to be able to disable warnings for specific directories outside of |
@Jack-023 This PR applies to addons only. In my opinion, it is not worth adding excessive configurability to arbitrary folders. You only have two script types in a project:
So you should always place third-party code in If you need to disable warnings for individual files, then there are other proposals: |
This seems to be a known issue of the addon: imjp94/gd-plug#32 As a workaround you can change the path to |
Wouldn't it be enough to enable warnings if the addon script is opened in script editor? This way you can see warnings and don't need to configure anything. |
I think not. First, for your own code, you would probably like to see all the warnings in the Debugger, even if the file is not open in the editor. Just because a plugin didn't have errors/warnings before doesn't mean they didn't appear after a Godot version update or other changes in the project. Second, this would mean that for addons, warnings with Error level should be treated as Warn, which is quite confusing (especially for warnings like |
I just had an idea:
The whole solution is based on this assumption, so I think the setting should reflect that and be named in a way that doesn't tie it to warnings. For example, based on godotengine/godot-proposals#10174 I had the idea to redirect symbol lookup to the documentation page instead of the code, if the script was located in We could use the setting for such use cases as well. But that would be very confusing with the current naming. |
Ideally, I think it should be possible for plugins to define their own GDScript settings independent of the overall project. But short of that, having just this improvement for now would be extremely helpful to me, since my current project involves a bespoke EditorPlugin, I rely on typing errors to catch coding mistakes, and I also rely on addons written by others that do not all use typing comprehensively, meaning I am stuck in a place where including addons for GDScript warnings and errors helpfully shows them for my own plugin but unhelpfully causes other plugins to fail to load. |
exclude_addons
.NATIVE_METHOD_OVERRIDE
). The lack of warnings/errors for actively developed addons is confusing.