Skip to content

[FR] - Make cardano-api/gen a normal library again due to haskell.nix incompatibility. #4455

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

Closed
MangoIV opened this issue Sep 19, 2022 · 9 comments
Assignees
Labels
comp: cardano-api enhancement New feature or request Stale type: enhancement An improvement on the existing functionality user type: external Created by an external user

Comments

@MangoIV
Copy link

MangoIV commented Sep 19, 2022

Internal/External
External When trying to depend on the cardano-node/cardano-api/gen lib, the ghcWrapper somehow doesn't include the lib in the shell environment. This makes it not really usable as a dependency.

Area
Other Any other topic (Delegation, Ranking, ...).

Describe the feature you'd like
I would like the gen library to be a normal toplevel library as long as all the bugs with sublibs aren't fixed.

Describe alternatives you've considered
The alternative is fixing haskell.nix and/or cabal

Additional context / screenshots
Also see this issue on haskell.nix

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

@github-actions github-actions bot added the Stale label Nov 25, 2022
@newhoggy
Copy link
Contributor

It's not possible to make library cardano-api:gen a separate package because test-suite cardano-api:cardano-api-test depends on library cardano-api:gen which in turn depends on library cardano-api.

test-suite cardano-api:cardano-api-test and library cardano-api are defined in the same package cardano-api, so cabal requires that the gen package exist in the same package as well.

Unfortunately, this means fixing haskell.nix and/or cabal is the only viable option.

@newhoggy newhoggy self-assigned this Feb 23, 2023
@eyeinsky
Copy link
Contributor

Unfortunately, this means fixing haskell.nix and/or cabal is the only viable option.

Improving haskell.nix seems like a good thing!

@newhoggy
Copy link
Contributor

@MangoIV , @eyeinsky I'm interested to know if this resolves the issue: #4970

@MangoIV
Copy link
Author

MangoIV commented Mar 12, 2023

Afaict yes.

@newhoggy
Copy link
Contributor

Can you point to where the library is used? Is it for consumption via an srp entry in a cabal.project or something else?

@MangoIV
Copy link
Author

MangoIV commented Mar 18, 2023

I tried it with both srp and nix extra hackage. Neither do worth. Sublibs just don't work. At least for Haskell.nix devShells. See the attached issue. Thank you.

@Jimbo4350
Copy link
Contributor

@MangoIV Instead of making cardano-api/gen a top level library, will adding a .cabal file for the generators fix your issue? I'd rather not add another library to the cardano-node repo.

@MangoIV
Copy link
Author

MangoIV commented Apr 14, 2023

I will close this issue as I don't depend on this anymore. I still want to note that one probably wants to abstain from using public sublibs as they're not fully supported by cabal yet and haskell.nix cannot deal with them for that reason and stuff will break.

@MangoIV MangoIV closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2023
@MangoIV MangoIV closed this as completed Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: cardano-api enhancement New feature or request Stale type: enhancement An improvement on the existing functionality user type: external Created by an external user
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants