Skip to content
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

Q: how does cabal build choose/ find the package nodes #8481

Open
MangoIV opened this issue Sep 18, 2022 · 7 comments
Open

Q: how does cabal build choose/ find the package nodes #8481

MangoIV opened this issue Sep 18, 2022 · 7 comments

Comments

@MangoIV
Copy link
Contributor

MangoIV commented Sep 18, 2022

I was wondering what exactly cabal looks at to decide which packages to include when trying to build a packages dependencies. (In particular I'm trying to find out what configuration could cabal cause to not include a sublib into a build although its *.conf file and the actual package is provided to the environment)

@jneira
Copy link
Member

jneira commented Sep 18, 2022

Hi, thanks for posting the question, maybe @fgaz or @grayjay could help us here with some insights
Related: #6039

@MangoIV
Copy link
Contributor Author

MangoIV commented Sep 18, 2022

Thank you very much, as you suggested, I will also include my reproducer, in this case, of course, only the cabal files are interesting.

@MangoIV
Copy link
Contributor Author

MangoIV commented Sep 18, 2022

One thing to note is that from an outside perspective, the respective package-db that you would get when including bla:bla-bla with a cabal.project vs including it via haskell.nix look basically the same. (Maybe I'm missing something though)

@gbaz
Copy link
Collaborator

gbaz commented Sep 21, 2022

You need to provide more details with the reproducer. What is the command given, the actual, and the expected behavior?

@MangoIV
Copy link
Contributor Author

MangoIV commented Sep 22, 2022

Hi @gbaz, in the reproducer, the haskell.nix code makes the dependencies available in the shell. If I try to cabal build in the blup dir, cabal tells me, that bla doesn't contain sublib blabla, although it does. It does pick up the package db, so that doesn't seem to be the reason. I basically want to know how cabal figures out what components a library (int this case bla) contains so I can trouble shoot that step by step. The reason for that is that I don't see how it corresponds to e.g. ghc-pkg and I don't see the difference in the package-dbs.

@Mikolaj
Copy link
Member

Mikolaj commented Oct 29, 2022

@MangoIV: I'm afraid, the question you ask very few living persons know the answer to or are able to code-dive and fish out. If you'd live to code-dive on your own, however, and diary the attempt here, I hope we'd be able to help and we'd all learn from the experience.

@fgaz
Copy link
Member

fgaz commented Mar 20, 2023

@MangoIV I'm pretty sure this is #6039 (comment) (see #5660 for the general status of multiple public libraries). You can confirm by trying to build with bare Cabal, that should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants