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

metadata revision for package memory #422

Closed
wrengr opened this issue Jan 7, 2025 · 5 comments
Closed

metadata revision for package memory #422

wrengr opened this issue Jan 7, 2025 · 5 comments

Comments

@wrengr
Copy link

wrengr commented Jan 7, 2025

This is separate from the maintainership and deprecation issues discussed in #419.

The changelog for 'memory' says that version 0.18 drops support for ghc < 8.8, and yet there is no lower bound on its 'base' dependency. Can we get a metadata revision to make this explicit and help cabal not fall over.

(Yes I know ghc-8.6.5 was released 2019-04-23 and is therefore no longer supported by most folks; but I have reasons, and it's just good hygiene anyways)

@andreasabel
Copy link
Contributor

@wrengr Could you please spell out how exactly the revision should look like?

Currently it says:

  if impl(ghc < 8.8)
    buildable: False
  else
    build-depends:   base
                   , ghc-prim

And I am getting this behavior:

$ cabal build -w ghc-8.6.5

Error: [Cabal-7127]
Cannot build the package memory-0.18.0 because none of the components are available to build: the test suite 'test-memory' and the library are all marked as 'buildable: False'

@phadej
Copy link
Member

phadej commented Jan 8, 2025

@andreasabel

  if impl(ghc < 8.8)
    buildable: False

doesn't trigger cabal-install solver backtracking. It will solve for it but fail to build. There are issues about this in cabal-install issue tracker, I don't remember the details. (buildable is underspecified field, what it's actually should do - the obvious thing is different for "public" components like library, and private like test-suites).

@andreasabel
Copy link
Contributor

andreasabel commented Jan 8, 2025

Revisions are limited in scope (e.g. Hackage forbids removing the if altogether) but this one is accepted by Hackage (to my surprise):

  if impl(ghc < 8.8)
    build-depends:   base >= 4.13
  else
    build-depends:   base >= 4.13
                   , ghc-prim

@wrengr Is this what you want?

@phadej
Copy link
Member

phadej commented Jan 8, 2025

@andreasabel you can always add base dependency. It's a special case, to have a way to restrict GHC versions (for a lack of more direct specification method).

@andreasabel
Copy link
Contributor

Ok, did that.
2025-01-08T13:09:25Z AndreasAbel memory-0.18.0-r1

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

3 participants