-
Notifications
You must be signed in to change notification settings - Fork 250
Adds sublib support #63
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
Conversation
81c9c4b
to
ba1f538
Compare
I don't think we want sublibs in the global package set, do we? Shouldn't we instead just augment the |
Right! That's precisely what I tried to get done properly :-) |
# | ||
# Note 2: if a package contains multiple libs (lib + sublibs) SETUP register will generate a | ||
# folder isntead of a file for the configuration. Therfore if the result is a folder, | ||
# we need to register each and every element of that folder. |
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.
Shouldn't there only be one package per derivation? Why would there be multiple?
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.
I think the issue is the all
target. If you run the following on a cabal file with a sublibrary:
$ runghc Setup.hs configure # without component target, as we do for `all`.
$ runghc Setup.hs register --gen-pkg-config=pkg.conf
you end up with a folder for pkg.conf
that contains the package configuration file for the library as well as the sublibrary.
If you don't have sublibraries, pkg.conf
is your package configuration file.
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.
@angerman So this only comes up when a package depends on the all
component? That shouldn't happen, should it?
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.
Why should this not happen? Why wouldn't we build the all
component? We do allow this right now (and the test case tried to do precisely that).
Thus, unless we want to remove the all
component again, I'm afraid we'll need to keep this.
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.
@angerman The all component is, to my understanding, only for the sake of users who want a shell for all, plus the novel purpose of building all components in one derivation. The intention is that components will depend on components, not on any all
derivation.
This adds the
sublib
test. Execute withand enjoy the gore!
Changing
modules/plan.nix
to:does get us a bit further. However, this results in the dependency to be a raw sublib instead of a package. And subsequently leads to breakage in the
builder/comp-builder.nix
.