Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes #13353 (hopefully)
GDScriptDepSort now sorts using the number of steps up to the base of the inheritance tree. This will sort the base classes before the things that inherit them which is what the original sort was wanting to do, but is also is transitive.
Testing:
This can be tested by using #13354 with the following test project: SortTest.zip. This bug being triggered does depend on the order of the scripts in the script list. I assume this order depends on the order they are loaded in so you may or may not see the bug with this test project. Incase it is difficult to reproduce with the test project I have also included a partial log of two test runs: log.txt. The bug in the log is that
node_a_51.gd
is getting sorted (and reloaded) beforenode_a_41.gd
, which is its base class.