Skip to content

Support allow-newer in constraint-set #670

@andreasabel

Description

@andreasabel

Initial discussion in a thread starting here: haskell-hvr/regex-tdfa#54 (comment)

I am trying to solve the following problem:

  1. Set up a constraint-set to test for bytestring-0.12 for some newer GHCs.
  2. I need allow-newer: bytestring as some of my dependencies do not allow bytestring-0.12 yet.
  3. Some dependencies (e.g. xor) will fail to configure on older GHCs if they are bound to the installed bytestring.
  4. However, some (e.g. xor) will also fail to build if their upper bound is loosened.

For example, looking at the following CI configuration:

installed: +all -mtl -transformers -unix -process -directory
  -- adding -bytestring here gives build failure for xor on GHC 7.6, 
  -- since `allow-newer` below allows for a too new `bytestring`
  -- not adding -bytestring here gives configuration failure for xor on GHC 7.6
constraint-set bytestring-0.12
  ghc: >= 8.2 && < 9.5
  constraints: bytestring ^>= 0.12.0.0
  tests: True
  run-tests: True
raw-project
  allow-newer: bytestring

The principled solution would be to have a allow-newer that is scoped by a constraint-set rather than action globally via raw-project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions