mr / ftp-client

Haskell FTP client
7 stars 15 forks source link

Doesn't build on GHC 9.2 due to low attoparsec bound #23

Closed ysangkok closed 6 months ago

ysangkok commented 2 years ago

Even after the revision bump allowing bytestring v0.11, the project doesn't compile on GHC 9.2 because of an additional constraint on attoparsec, even with the cabal.project for Cryptonite, Memory and Foundation.

janus@gorm ~/flipstone % cabal get ftp-client
Unpacking to ftp-client-0.5.1.4/
janus@gorm ~/flipstone % cd ftp-client-0.5.1.4 
janus@gorm ~/flipstone/ftp-client-0.5.1.4
 % cd 
janus@gorm ~/flipstone/ftp-client-0.5.1.4
 % cabal build
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: ftp-client-0.5.1.4 (user goal)
[__1] trying: connection-0.3.1 (dependency of ftp-client)
[__2] trying: x509-validation-1.6.11 (dependency of connection)
[__3] trying: memory-0.16.0 (dependency of x509-validation)
[__4] next goal: base (dependency of ftp-client)
[__4] rejecting: base-4.16.0.0/installed-4.16.0.0 (conflict: memory =>
base<4.16)
[__4] skipping: base-4.16.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '<4.16' from 'memory')
[__4] rejecting: base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0,
base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
[__4] fail (backjumping, conflict set: base, ftp-client, memory)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, memory, x509-validation,
cryptohash, connection, ftp-client
Try running with --minimize-conflict-set to improve the error message.

janus@gorm ~/flipstone/ftp-client-0.5.1.4
 % cp ../ftp-client/ftp-client/cabal.project .
janus@gorm ~/flipstone/ftp-client-0.5.1.4
 % cabal build                                
Cloning into '/home/janus/flipstone/ftp-client-0.5.1.4/dist-newstyle/src/foundation-7b35250d1ecb1cbf'...
remote: Enumerating objects: 12682, done.
remote: Counting objects: 100% (63/63), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 12682 (delta 17), reused 32 (delta 12), pack-reused 12619
Receiving objects: 100% (12682/12682), 2.53 MiB | 3.70 MiB/s, done.
Resolving deltas: 100% (8746/8746), done.
HEAD is now at 0bb195e Update basement for GHC 9.2
Cloning into '/home/janus/flipstone/ftp-client-0.5.1.4/dist-newstyle/src/cryptonite-b66e2180bd14ddee'...
remote: Enumerating objects: 7452, done.
remote: Counting objects: 100% (255/255), done.
remote: Compressing objects: 100% (169/169), done.
remote: Total 7452 (delta 139), reused 149 (delta 82), pack-reused 7197
Receiving objects: 100% (7452/7452), 2.13 MiB | 4.25 MiB/s, done.
Resolving deltas: 100% (5189/5189), done.
HEAD is now at 3b081e3 Fix build on GHC 9.2
Cloning into '/home/janus/flipstone/ftp-client-0.5.1.4/dist-newstyle/src/hs-memory-1e2ffb61aca0a6c0'...
remote: Enumerating objects: 1689, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (49/49), done.
remote: Total 1689 (delta 31), reused 64 (delta 27), pack-reused 1612
Receiving objects: 100% (1689/1689), 330.79 KiB | 1.27 MiB/s, done.
Resolving deltas: 100% (996/996), done.
HEAD is now at 3cf661a Compile with GHC 9.2.1
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: basement-0.0.12 (user goal)
[__1] trying: base-4.16.0.0/installed-4.16.0.0 (dependency of basement)
[__2] trying: cryptonite-0.29 (user goal)
[__3] trying: bytestring-0.11.1.0/installed-0.11.1.0 (dependency of
cryptonite)
[__4] trying: ftp-client-0.5.1.4 (user goal)
[__5] next goal: attoparsec (dependency of ftp-client)
[__5] rejecting: attoparsec-0.14.3 (conflict: ftp-client => attoparsec>=0.10
&& <0.14)
[__5] skipping: attoparsec-0.14.2, attoparsec-0.14.1 (has the same
characteristics that caused the previous version to fail: excluded by
constraint '>=0.10 && <0.14' from 'ftp-client')
[__5] rejecting: attoparsec-0.13.2.5 (conflict: base =>
ghc-prim==0.8.0/installed-0.8.0, attoparsec => ghc-prim<0.8)
[__5] rejecting: attoparsec-0.13.2.4 (conflict:
bytestring==0.11.1.0/installed-0.11.1.0, attoparsec => bytestring<0.11)
[__5] skipping: attoparsec-0.13.2.3, attoparsec-0.13.2.2, attoparsec-0.13.2.1,
attoparsec-0.13.2.0, attoparsec-0.13.1.0, attoparsec-0.13.0.2,
attoparsec-0.13.0.1, attoparsec-0.13.0.0, attoparsec-0.12.1.6,
attoparsec-0.12.1.5, attoparsec-0.12.1.4, attoparsec-0.12.1.3,
attoparsec-0.12.1.2, attoparsec-0.12.1.1, attoparsec-0.12.1.0,
attoparsec-0.12.0.0, attoparsec-0.11.3.4, attoparsec-0.11.3.3,
attoparsec-0.11.3.2, attoparsec-0.11.3.1, attoparsec-0.11.3.0,
attoparsec-0.11.2.1, attoparsec-0.11.1.0, attoparsec-0.10.4.0,
attoparsec-0.10.3.0, attoparsec-0.10.2.0, attoparsec-0.10.1.1,
attoparsec-0.10.1.0, attoparsec-0.10.0.3, attoparsec-0.10.0.2,
attoparsec-0.10.0.1, attoparsec-0.10.0.0 (has the same characteristics that
caused the previous version to fail: excludes 'bytestring' version 0.11.1.0)
[__5] rejecting: attoparsec-0.9.1.2 (conflict: ftp-client => attoparsec>=0.10
&& <0.14)
[__5] skipping: attoparsec-0.9.1.1, attoparsec-0.9.0.0, attoparsec-0.8.6.1,
attoparsec-0.8.6.0, attoparsec-0.8.5.3, attoparsec-0.8.5.2,
attoparsec-0.8.5.1, attoparsec-0.8.5.0, attoparsec-0.8.4.0,
attoparsec-0.8.3.0, attoparsec-0.8.2.0, attoparsec-0.8.1.1,
attoparsec-0.8.1.0, attoparsec-0.8.0.2, attoparsec-0.8.0.1,
attoparsec-0.8.0.0, attoparsec-0.7.2, attoparsec-0.7.1, attoparsec-0.6,
attoparsec-0.5.1, attoparsec-0.5, attoparsec-0.4 (has the same characteristics
that caused the previous version to fail: excluded by constraint '>=0.10 &&
<0.14' from 'ftp-client')
[__5] fail (backjumping, conflict set: attoparsec, base, bytestring,
ftp-client)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ftp-client, base, bytestring,
attoparsec, cryptonite, basement
Try running with --minimize-conflict-set to improve the error message.

By changing the upper bound of attoparsec to allow 0.14 (e.g. have it be <0.15, it compiles:

 % cabal build
HEAD is now at 0bb195e Update basement for GHC 9.2
HEAD is now at 3b081e3 Fix build on GHC 9.2
HEAD is now at 3cf661a Compile with GHC 9.2.1
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
 - ftp-client-0.5.1.4 (lib) (first run)
Configuring library for ftp-client-0.5.1.4..
Preprocessing library for ftp-client-0.5.1.4..
Building library for ftp-client-0.5.1.4..
[1 of 1] Compiling Network.FTP.Client ( src/Network/FTP/Client.hs, /home/janus/flipstone/ftp-client-0.5.1.4/dist-newstyle/build/x86_64-linux/ghc-9.2.1/ftp-client-0.5.1.4/build/Network/FTP/Client.o, /home/janus/flipstone/ftp-client-0.5.1.4/dist-newstyle/build/x86_64-linux/ghc-9.2.1/ftp-client-0.5.1.4/build/Network/FTP/Client.dyn_o )

(testing is a separate issue which I will file once tasty-hspec allows GHC 9.2 EDIT: As of Feb 20 2022, I have tested that the test suite passes with #24 and cabal test -w ghc-9.2.1 --constraint='attoparsec>=0.14')

ysangkok commented 2 years ago

With the upper bound of attoparsec changed in the downloaded revision, the test suite does pass on GHC 8.10:

janus@gorm ~/flipstone/ftp-client-0.5.1.4
 % cabal test --constraint='attoparsec>=0.14'
Resolving dependencies...
Build profile: -w ghc-8.10.7 -O1
In order, the following will be built (use -v for more details):
 - ftp-client-0.5.1.4 (test:ftp-client-test) (first run)
Preprocessing test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Building test suite 'ftp-client-test' for ftp-client-0.5.1.4..
Running 1 test suites...
Test suite ftp-client-test: RUNNING...
Test suite ftp-client-test: PASS
Test suite logged to:
/home/janus/flipstone/ftp-client-0.5.1.4/dist-newstyle/build/x86_64-linux/ghc-8.10.7/ftp-client-0.5.1.4/t/ftp-client-test/test/ftp-client-0.5.1.4-ftp-client-test.log
1 of 1 test suites (1 of 1 test cases) passed.
sjakobi commented 2 years ago

As a Hackage trustee, I have published a revision that bumps the upper bound on attoparsec as requested in haskell-infra/hackage-trustees#325:

https://hackage.haskell.org/package/ftp-client-0.5.1.4/revisions/

ysangkok commented 6 months ago

Closing this since I took over the package.