Closed ajwittmond closed 10 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
97f55ed
) 92.34% compared to head (0b4bd35
) 92.73%. Report is 1 commits behind head on master.:exclamation: Current head 0b4bd35 differs from pull request most recent head 272b8fd. Consider uploading reports for the commit 272b8fd to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hey @ajwittmond, thanks so much for your contribution, and sorry for the delay with my review. This is a great catch and I really appreciate you figuring out what went wrong and how to fix it. After a bit of investigation, I think the crux of the issue is that we didn't specify the upstream dependencies for internal modules correctly (which you solved by removing the bad dependencies), I tweaked the logic to generate the right dependencies to begin with.
Could you please check if the new version still fixes the original issue you encountered? Thanks again.
I have confirmed that the new changes fix the original issue and agree that passing all of the relevant dependencies to the sort as nodes is a better solution. Thank you for addressing this.
This is a bugfix for a subtle issue in the topological sorting of nested submodules. The issue occurs when
This issue occurs due to the fact that when sorting submodules, the external modules are not included in the sort however they are still returned from
get_upstream_dependencies!
This breaks the algorithms and causes nodes with these dependencies to not be processed and instead be falsely identified as cyclical dependencies.The result of this is that the generated files have the wrong import order, which results in undefined references.
I have added and example of this occurring to the tests.