[ 
https://issues.apache.org/jira/browse/THRIFT-4634?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16616298#comment-16616298
 ] 

ASF GitHub Bot commented on THRIFT-4634:
----------------------------------------

jeking3 closed pull request #1594: THRIFT-4634: work around cabal 1.22 
dependency bug breaking CI job for Xenial
URL: https://github.com/apache/thrift/pull/1594
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/build/docker/ubuntu-xenial/Dockerfile 
b/build/docker/ubuntu-xenial/Dockerfile
index 1e700029e9..c69bec29b1 100644
--- a/build/docker/ubuntu-xenial/Dockerfile
+++ b/build/docker/ubuntu-xenial/Dockerfile
@@ -151,10 +151,16 @@ RUN curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz && 
\
       ln -s /usr/local/go/bin/go /usr/local/bin && \
       rm golang.tar.gz
 
+# due to a bug in cabal in xenial (cabal-install package) we pull in another:
 RUN apt-get install -y --no-install-recommends \
 `# Haskell dependencies` \
-      ghc \
-      cabal-install
+      ghc && \
+    cd /tmp && \
+    wget -q 
https://www.haskell.org/cabal/release/cabal-install-1.24.0.2/cabal-install-1.24.0.2-x86_64-unknown-linux.tar.gz
 && \
+    tar xzf cabal-install-1.24.0.2-x86_64-unknown-linux.tar.gz && \
+    find dist-newstyle/ -type f -name cabal -exec mv {} /usr/bin \; && \
+    rm -rf /tmp/cabal* && \
+    cabal --version
 
 RUN apt-get install -y --no-install-recommends \
 `# Haxe dependencies` \
diff --git a/lib/hs/thrift.cabal b/lib/hs/thrift.cabal
index 4e9cb189c9..03a9814f38 100644
--- a/lib/hs/thrift.cabal
+++ b/lib/hs/thrift.cabal
@@ -19,7 +19,7 @@
 
 Name:           thrift
 Version:        1.0.0-dev
-Cabal-Version:  >= 1.8
+Cabal-Version:  >= 1.24
 License:        OtherLicense
 Category:       Foreign
 Build-Type:     Simple
@@ -63,7 +63,9 @@ Library
     Thrift.Transport.IOBuffer,
     Thrift.Transport.Memory,
     Thrift.Types
-  Extensions:
+  Default-Language:
+    Haskell2010
+  Default-Extensions:
     DeriveDataTypeable,
     ExistentialQuantification,
     FlexibleInstances,


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Haskell builds with older cabal cannot reconcile complex version requirements
> -----------------------------------------------------------------------------
>
>                 Key: THRIFT-4634
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4634
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process, Haskell - Library
>    Affects Versions: 0.11.0
>            Reporter: James E. King III
>            Assignee: James E. King III
>            Priority: Minor
>             Fix For: 0.12.0
>
>
> The cabal version in Ubuntu Xenial is 1.22.6.0 and it has been failing on CI 
> since HTTP-4000 changed to allow "network < 2.8" - the resulting output is:
> {noformat}
> root@48ae26f5e4f3:/thrift/src/lib/hs# make
> /usr/bin/cabal update
> Downloading the latest package list from hackage.haskell.org
> Skipping download: Local and remote files match.
> /usr/bin/cabal install
> Resolving dependencies...
> cabal: Could not resolve dependencies:
> trying: thrift-1.0.0 (user goal)
> trying: network-2.8.0.0 (dependency of thrift-1.0.0)
> trying: HTTP-4000.3.12 (dependency of thrift-1.0.0)
> trying: HTTP-4000.3.12:-conduit10
> trying: HTTP-4000.3.12:-mtl1
> rejecting: HTTP-4000.3.12:+network-uri (conflict: network==2.8.0.0,
> HTTP-4000.3.12:network-uri => network>=2.6 && <2.8)
> rejecting: HTTP-4000.3.12:-network-uri (conflict: network==2.8.0.0,
> HTTP-4000.3.12:network-uri => network>=2.2.1.8 && <2.6)
> Backjump limit reached (change with --max-backjumps).
> Makefile:639: recipe for target 'all-local' failed
> make: *** [all-local] Error 1
> {noformat}
> thrift has no direct dependency on network 2.8.0.0 - why it is being selected 
> first is beyond me.  It should back off to 2.7.0.2 once it sees the 
> network-uri set of dependencies.  It looks like the cabal in Ubuntu Bionic 
> doesn't have this problem.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to