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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Post-multilibs checklist #5660

Open
fgaz opened this issue Nov 4, 2018 · 6 comments

Comments

@fgaz
Copy link
Collaborator

commented Nov 4, 2018

#5526 is in, but there are still a few things to add and polish

To be done before 3.0 comes out:

  • Add a visibility field to sublibraries 馃敟 馃敟 馃敟 鉂楋笍 鉂楋笍 鉂楋笍
    • add the field
    • update ghc-pkg
    • populate the field
    • enforce the field: #5848
  • Add tests
    • positive (ghc>=8.8)
    • negative (all ghcs) (#5848)
  • Update changelog 4d2ca52
  • Update docs
  • it would be good to fix #6083...
  • #6039 (possibly before the cabal-install 3.0 release)

Other things:

  • Maybe more source comments
  • Maybe: Deprecate old syntax
    • remove all the bits of code that handle the old syntax (there's lots of them) and do it all in a single spot (hint: grep for packageNameToUnqualComponentName)
  • Update cabal init to take into account sublibraries when populating build-depends

@fgaz fgaz added the meta: fgaz label Nov 4, 2018

@fgaz fgaz added this to the 3.0 milestone Nov 4, 2018

@fgaz fgaz self-assigned this Nov 4, 2018

@phadej

This comment has been minimized.

Copy link
Collaborator

commented Nov 25, 2018

I mark this as high priority as 3.0 cannot be released before Add a visibility field to sublibraries is done.

ping @23Skidoo @hvr

@phadej

This comment has been minimized.

Copy link
Collaborator

commented Nov 25, 2018

Should solver be able to flip flags based on visible field? I think it should, but I don't know if it will make implementation tricky.

I don't know a good motivation, maybe pkgA:foo is visible, only if pkgB:bar is available, and author of pkgA.

e.g. pkgA.cabal:

cabal-version: 3.0
name: pkgA
...

library
   -- available always
  build-depends: foo

flag foo
  description: Provide pkgA:foo
  manual: False
  default: True

library foo
  -- this is contrived example, but ...
  -- also it's somewhat fragile, as there isn't a complement constraint; but it should work
  if foo
    visible: True
    build-depends: pkgB:bar

 -- if not pkgB:bar, there's still some stuff to be used by pkgA
@phadej

This comment has been minimized.

Copy link
Collaborator

commented Nov 25, 2018

we will need MIN_VERSION_pkgB:foo kind of thing. No idea how the name should be generated though. Maybe double underscore: MIN_VERSION_pkgB__foo? as there cannot be package pkgB--foo?

@phadej

This comment has been minimized.

Copy link
Collaborator

commented Nov 25, 2018

Should visibility be recorded into InstalledInfo. Then ./Setup.hs will be able to fail if you try to "manually" use a internal library which was registered as non-visible.

Note: this change would need GHC support (as package database is ghc-pkg business), so this makes things tricky. (practically limiting multilibs for ghc-8.8+)

@fgaz

This comment has been minimized.

Copy link
Collaborator Author

commented Nov 26, 2018

re IPI: yeah, I came to the same conclusion but didn't know how to go at it :-/

Is it just a matter of updating the cabal submodule in the ghc repo?

@phadej

This comment has been minimized.

Copy link
Collaborator

commented Nov 26, 2018

@fgaz essentially yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.