facebookincubator / retrie

Retrie is a powerful, easy-to-use codemodding tool for Haskell.
MIT License
502 stars 30 forks source link

Support for text 2.0 #42

Closed pepeiborra closed 3 months ago

pepeiborra commented 2 years ago

I don't think that there are any changes needed, but testing a relaxed constraint fails with a cabal solver error because ghc depends on a version of parsec that requires text <2.0:

cabal configure        
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: retrie-1.2.0.1 (user goal)
[__1] trying: ghc-9.2.1/installed-9.2.1 (dependency of retrie)
[__2] next goal: parsec (dependency of ghc)
[__2] rejecting: parsec-3.1.14.0/installed-3.1.14.0 (constraint from project
config /Users/pepeiborra/scratch/retrie/cabal.project requires ==3.1.15.0)
[__2] rejecting: parsec-3.1.15.0 (conflict: ghc =>
parsec==3.1.14.0/installed-3.1.14.0)
[__2] rejecting: parsec-3.1.14.0, parsec-3.1.13.0, parsec-3.1.11,
parsec-3.1.10, parsec-3.1.9, parsec-3.1.8, parsec-3.1.7, parsec-3.1.6,
parsec-3.1.5, parsec-3.1.4, parsec-3.1.3, parsec-3.1.2, parsec-3.1.1,
parsec-3.1.0, parsec-3.0.1, parsec-3.0.0, parsec-2.1.0.1, parsec-2.1.0.0,
parsec-2.0.0.1, parsec-2.0, parsec-3.1.12.0 (constraint from project config
/Users/pepeiborra/scratch/retrie/cabal.project requires ==3.1.15.0)
[__2] fail (backjumping, conflict set: ghc, parsec)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: parsec, retrie, ghc, unbuildable
Try running with --minimize-conflict-set to improve the error message.

This is using a custom cabal.project:

packages: .

constraints: 
  text >= 2.0,
  parsec ==3.1.15.0

allow-newer:
  ghc:parsec
Bodigrim commented 2 years ago

testing a relaxed constraint fails with a cabal solver error because ghc depends on a version of parsec that requires text <2.0

This will be fixed by https://gitlab.haskell.org/ghc/ghc/-/commit/d0214a61d4 in upcoming GHC 9.2.2.

Bodigrim commented 2 years ago

While we wait from GHC 9.2.2, as a Hackage trustee I revised retrie-1.1.0.0 (https://hackage.haskell.org/package/retrie-1.1.0.0/revisions/), so that text-2.0 can be used with GHC < 9.2.

Bodigrim commented 2 years ago

@pepeiborra with GHC 9.2.2 you can just compile retrie against text-2.0 without difficulties with parsec. I made a correspondent revision: https://hackage.haskell.org/package/retrie-1.2.0.1/revisions/

pepeiborra commented 2 years ago

Thank you! I have sent https://github.com/facebookincubator/retrie/pull/44 to record that change in the repo