Open
Description
#5526 (multiple public libraries) is in, but there are still a few things to add and polish
Visibility enforcement
- Add a visibility field to sublibraries 🔥 🔥 🔥 ❗ ❗ ❗
- add the field
- update ghc-pkg
- populate the field
- enforce the field: Prevent dependency on private library #5848
cabal-install integration
- Make the solver multilibs-aware Make the cabal-install solver multilibs-aware #6039
- Enforce visibility at the solver level Solver: Support dependencies on sub-libraries (issue #6039). #6047 Solver: Support dependencies on sub-libraries (issue #6039) (3rd iteration) #6836
- Extend the compatibility to GHC<8.8 when using cabal-install Solver: Support dependencies on sub-libraries (issue #6039) (3rd iteration) #6836
- Handle installed packages
- Update
cabal init
to take into account sublibraries when populating build-depends
Tests
- Add tests
- positive (ghc>=8.8) (isssue Add positive test for multilibs. #6409)
- negative (all ghcs) (done in Prevent dependency on private library #5848)
Documentation
- Update changelog 4d2ca52
- Visibility field not listed under cabal spec changes. #6362 Also update the cabal spec changelog, which I forgot
- Document multiple public libraries #8364 Update the Cabal and cabal-install docs (can be adapted from my post)
Bugfixes
- cabal-install: cannot depend on public sublibrary when the package does not contain a main library too #6038 (cannot depend on public sublibrary when the package does not contain a main library too)
- Cabal: cannot depend on public sublibrary when the package does not contain a main library too #8095 same but with
Setup.hs
/Cabal
and installed packages - Wrong "cabal: Encountered missing or private dependencies" error on sublibraries that start with "z" #7375 (same as Cabal: cannot depend on public sublibrary when the package does not contain a main library too #8095??)
- Boundless sublibrary dependency fails to parse #5846 (boundless dependency fails to parse)
- Cabal 3: in build-depends, package name gets treated as internal library name ("legacy" syntax) even when using the pkg:lib qualified syntax #6083 (edge case with the old syntax)
-
mylib:{ } ^>= 42
syntax is accepted, though docs say it is not (Cabal 3: in build-depends, package name gets treated as internal library name ("legacy" syntax) even when using the pkg:lib qualified syntax #6083 related, makes sense to fix at the same time?) - fixedin 9b3686f - Parse error when trying to use multiple public libraries within mixins #6281 (parse failure with mixins)
- Reconfiguration avoidance not affected by library visibility change #6358 Reconfiguration avoidance not affected by library visibility change
- 🔥 Dependency on installed public sublibrary without --dependency flag #7270 🔥 Cabal's simple solver may not pick up sublibraries unless --dependency is used?
- Deprecate
lookupDependency
in favor oflookupInternalDependency
and maybe a newlookupPackageDependency
that looks up all libraries of a package
- Deprecate
Ecosystem changes
- Make hackage render sublibraries too
- Nix Handle internal libraries correctly NixOS/cabal2nix#539
Activity