-
Notifications
You must be signed in to change notification settings - Fork 86
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
Adding all dependencies to propagatedBuildInputs
is not sustainable.
#544
Comments
It appears that the amplification happens due to See relevant issue at NixOS/nixpkgs#364984. |
To my understanding, we end up with many (See here for the current Nix generation logic.) I wonder how necessary this actually is. What would happen if we tried to use I also wonder if we can handle the
At the moment, we add
This I wonder if we can convince the ROS package manifest format team to make some changes that would help us and improve the ecosystem.
|
I have to revisit this but I think that the main issue with In general When a library B has publicly used headers of library A, and a library C needs B, it needs to not only be linked to B but also have access to A's headers /for the build/, hence it needs a When using I think a workable alternative is to use EDIT: This won't work because |
The heavy usage of
propagatedBuildInputs
means that projects with many dependencies end up collecting a ton of gcc flags through thecc-wrapper
.This includes - for each dependency in the dependency chain - the include folder path and the lib folder path together.
Each path is ~80 characters on average.
When using a dev-shell for a workspace, it will pickup a ton of transitive dependencies from all the workspace packages.
As an example, my devshell environment ends up with ~260 dependencies (because they are transitive).
For some reason these get a x3 duplication in the cc-wrapper invocation, probably due to a cc-wrapper setup-hook.sh omition when
propagatedBuildInputs
or something, I am still investigating the reason, it seems x2 duplication is a nixpkgs issue NixOS/nixpkgs#364984 not sure where the extra duplication comes from.This means that any gcc invocation ends up with x3 x260 x2 x80 = 124800 kb worth of flags.
Add all the extra
-system
and additional gcc crafts and we end up hitting NixOS/nixpkgs#41340This was not an issue for me with an older
master
commit, I am guessing that some packages just added a few extra transitive dependencies and it managed to tip the balance.I guess the best possible approach here is to find the reason behind the
x3
flag amplification.UPDATE: It seems this is not even a x3 amplification, it depends in the chain of dependencies I managed to even get up to x5 amplification of flags.
The text was updated successfully, but these errors were encountered: