-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Fix circular dependencies between libraries #108426
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
base: master
Are you sure you want to change the base?
Conversation
9f3d3cd
to
ac45192
Compare
What's the issue currently? And what does your PR do? Can you add a little bit more detail to your description? |
This is a draft PR that is not intended to be reviewed. I am using it just to kick off CI workflows to test builds on all the platforms. That said, the commit messages do have more complete descriptions, and #108429 and #108415 are other relevant issues and PRs involved. |
2cfffa3
to
2d9439f
Compare
Actually, now that I think I've got things working on all platforms, I will go ahead and re-use this PR to submit just the changes needed to fix the circular dependencies. |
env.Prepend(LIBS=[lib]) | ||
|
||
# Needed to force rebuilding the core files when the thirdparty code is updated. | ||
env.Depends(lib, thirdparty_obj) |
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.
Note that thirdparty_obj
is added to env.core_sources
above on line 163, so removing this explicit env.Depends()
should not have any effect.
This merges the libraries from scene/, core/ drivers/, servers/, main/, editor/, platform/, modules/, and tests/ into a single library. Each of these directories includes code from the others, so trying to build them as separate libraries causes problems, because they all circularly depend on each other. I'm sort of surprised that the build has worked up until now, given that code in core/ depends on symbols from modules/, scene/ and servers/. This fixes godotengine#108429, and is needed to help unblock godotengine#108415.
Out of curiosity: how did you go about finding these? Was it from the compile errors alone, or is there an SCons command/tool you used? I've tried using the latter with |
Initially some of it was just from the build errors while working on #108415, but then I just did a pretty dumb grep to look for includes that shouldn't be there. e.g. Grepping for all the includes and sorting the results by include path is also helpful to look for things that shouldn't be there:
|
Fix circular dependencies between libraries
This merges the libraries from scene/, core/ drivers/, servers/, main/,
editor/, platform/, modules/, and tests/ into a single library.
Each of these directories includes code from the others, so trying to
build them as separate libraries causes problems, because they all
circularly depend on each other. I'm sort of surprised that the build
has worked up until now, given that code in core/ depends on symbols
from modules/, scene/ and servers/.
This fixes #108429, and is needed to help unblock #108415.