-
Notifications
You must be signed in to change notification settings - Fork 16
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
Request: Add warnings for unused properties #5
Comments
In what context? I can certainly add a warning for unused variables on scripts, as well as unused locals in functions, but unused properties would require checking to see if any script that references the current script uses them, which is not something that's viable for me to do at compile time. |
Hmm. Unused properties is one of the most common warnings output to the Papyrus log. If you can figure it out...
But these would be useful, too. |
Assuming the unused properties warning you're referring to is the same one described here, there's nothing I can do about that. That warning is triggered when there are properties set in the .esp or .esm that aren't present on the actual scripts themselves. This typically happens when a property is removed from the actual script. |
There are errors when a script has a property that is filled but which is otherwise unused.
This property isn't used in any script, except for its declaration. It is filled, but with the wrong object, so you see this error. A warning for possible orphaned properties would be useful. For compiling Bethesda's scripts, it would help with cleaning up these unused properties, and for compiling our own scripts, it would let us know when we've possibly forgotten something. This is the JavaScript equivalent in UltraEdit. |
Even if I remove that property, you'll still get a Warning because the actual binding data in the With some significant re-structuring it would be possible for me to implement a global analysis to see which properties are used, but that would only be viable when compiling the entire source tree, and wouldn't work for any of the fragments. Although Champollion does decompile fragments into Papyrus script, and Caprica is able to compile those into .pex files, the original source for the fragments is not (as far as I know) Papyrus script, it is .xml files used by the Creation Kit. |
I know, but in my opinion, it's better to see warnings than none.
While that system would be more useful, it's a bit much for what would ultimately just help clean up the Papyrus log and messy scripts. I was only requesting a "is this property used in the script being compiled?" check, which should run much faster in C++ than JS. |
I can certainly do that, but I'd be putting it behind a I've been needing to add a |
NT
The text was updated successfully, but these errors were encountered: