haskell / vector

An efficient implementation of Int-indexed arrays (both mutable and immutable), with a powerful loop optimisation framework .
Other
365 stars 139 forks source link

vector-0.11.0.0 is (probably) breaking everything! #92

Closed tebello-thejane closed 9 years ago

tebello-thejane commented 9 years ago

I'm not entirely sure what the problem is, but it seems like the new vector package is incompatible with a few, also recent, packages, and cabal's solver is deciding to install ancient versions of the latter packages rather than the slightly older vector-0.10.12.3, breaking stuff.

Please see the following:

Is the issue with vector? How can it be rectified?

I do not have the knowledge to analyse this further, but it obvious that something is not kashrut.

hvr commented 9 years ago

I bet this isn't the solver's fault but rather due to invalid meta-data on Hackage

PS: I've read through #2759 (and commented there) and it seems the problem has been in fact identified as being caused by incorrect meta-data on Hackage which was fixed? Or does the problem still persist?

tebello-thejane commented 9 years ago

2 hours ago I made a simple documentation change to https://github.com/fpco/inline-c (https://github.com/fpco/inline-c/pull/32), and travic-ci failed with the same thing happening (https://travis-ci.org/fpco/inline-c/jobs/75569723):

Registering Chart-1.0...

Installed Chart-1.0

Downloading Chart-cairo-1.0...

Configuring Chart-cairo-1.0...

Building Chart-cairo-1.0...

Preprocessing library Chart-cairo-1.0...

[1 of 1] Compiling Graphics.Rendering.Chart.Backend.Cairo ( Graphics/Rendering/Chart/Backend/Cairo.hs, dist/build/Graphics/Rendering/Chart/Backend/Cairo.o )

In-place registering Chart-cairo-1.0...

Installing library in

/home/travis/.cabal/lib/x86_64-linux-ghc-7.8.4/Chart-cairo-1.0

Registering Chart-cairo-1.0...

Installed Chart-cairo-1.0

2.29s$ cabal configure -flib-Werror -v2 --enable-tests --enable-benchmarks -fgsl-example

'/opt/ghc/7.8.4/bin/ghc' '--numeric-version'

looking for tool ghc-pkg near compiler in /opt/ghc/7.8.4/bin

found ghc-pkg in /opt/ghc/7.8.4/bin/ghc-pkg

'/opt/ghc/7.8.4/bin/ghc-pkg' '--version'

'/opt/ghc/7.8.4/bin/ghc' '--supported-languages'

'/opt/ghc/7.8.4/bin/ghc' '--info'

Reading available packages...

Choosing modular solver.

Resolving dependencies...

Configuring inline-c-0.5.4.3...

Flags chosen: gsl-example=True

Dependency Chart ==1.0: using Chart-1.0

Dependency Chart-cairo ==1.0: using Chart-cairo-1.0

Dependency QuickCheck ==2.8.1: using QuickCheck-2.8.1

Dependency ansi-wl-pprint ==0.6.7.2: using ansi-wl-pprint-0.6.7.2

Dependency base ==4.7.0.2: using base-4.7.0.2

Dependency binary ==0.7.1.0: using binary-0.7.1.0

Dependency bytestring ==0.10.4.0: using bytestring-0.10.4.0

Dependency containers ==0.5.5.1: using containers-0.5.5.1

Dependency cryptohash ==0.11.6: using cryptohash-0.11.6

Dependency directory ==1.2.1.0: using directory-1.2.1.0

Dependency filepath ==1.3.0.2: using filepath-1.3.0.2

Dependency hashable ==1.2.3.3: using hashable-1.2.3.3

Dependency hspec ==2.1.10: using hspec-2.1.10

Dependency inline-c -any: using inline-c-0.5.4.3

Dependency mtl ==2.2.1: using mtl-2.2.1

Dependency parsec ==3.1.9: using parsec-3.1.9

Dependency parsers ==0.12.2.1: using parsers-0.12.2.1

Dependency raw-strings-qq ==1.0.2: using raw-strings-qq-1.0.2

Dependency regex-posix ==0.95.2: using regex-posix-0.95.2

Dependency template-haskell ==2.9.0.0: using template-haskell-2.9.0.0

Dependency transformers ==0.4.3.0: using transformers-0.4.3.0

Dependency unordered-containers ==0.2.5.1: using unordered-containers-0.2.5.1

Dependency vector ==0.11.0.0: using vector-0.11.0.0

[...]

The command "cabal configure -flib-Werror -v2 --enable-tests --enable-benchmarks -fgsl-example" exited with 0.

21.18s$ cabal build

Building inline-c-0.5.4.3...

Preprocessing library inline-c-0.5.4.3...

[1 of 8] Compiling Language.C.Types.Parse ( src/Language/C/Types/Parse.hs, dist/build/Language/C/Types/Parse.o )

[2 of 8] Compiling Language.C.Inline.HaskellIdentifier ( src/Language/C/Inline/HaskellIdentifier.hs, dist/build/Language/C/Inline/HaskellIdentifier.o )

[3 of 8] Compiling Language.C.Types ( src/Language/C/Types.hs, dist/build/Language/C/Types.o )

[4 of 8] Compiling Language.C.Inline.FunPtr ( src/Language/C/Inline/FunPtr.hs, dist/build/Language/C/Inline/FunPtr.o )

[5 of 8] Compiling Language.C.Inline.Context ( src/Language/C/Inline/Context.hs, dist/build/Language/C/Inline/Context.o )

[6 of 8] Compiling Language.C.Inline.Internal ( src/Language/C/Inline/Internal.hs, dist/build/Language/C/Inline/Internal.o )

[7 of 8] Compiling Language.C.Inline.Unsafe ( src/Language/C/Inline/Unsafe.hs, dist/build/Language/C/Inline/Unsafe.o )

src/Language/C/Inline/Unsafe.hs:45:1: Warning:

    Local definition of ‘pure’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

[8 of 8] Compiling Language.C.Inline ( src/Language/C/Inline.hs, dist/build/Language/C/Inline.o )

src/Language/C/Inline.hs:244:1: Warning:

    Local definition of ‘pure’ clashes with a future Prelude name - this will become an error in GHC 7.10, under the Applicative-Monad Proposal.

In-place registering inline-c-0.5.4.3...

Preprocessing executable 'gsl-ode' for inline-c-0.5.4.3...

examples/gsl-ode.hs:15:18:

    Could not find module ‘Graphics.Rendering.Chart.Easy’

    Perhaps you meant

      Graphics.Rendering.Chart.Axis (from Chart-1.0)

      Graphics.Rendering.Chart.Grid (from Chart-1.0)

      Graphics.Rendering.Chart.Plot (from Chart-1.0)

    Use -v to see a list of the files searched for.

So...

Unless there is some caching happening, then this is not fixed upstream...

hvr commented 9 years ago

The problem is quite clearly in inline-c which claims to work with any version of Chart, while it obviously requires a different version than Chart-1.0 (The earliest version of Chart to provide Graphics.Rendering.Chart.Easy is http://hackage.haskell.org/package/Chart-1.3 afaics)

executable gsl-ode
  hs-source-dirs:      examples
  main-is:             gsl-ode.hs
  c-sources:           examples/gsl-ode.c
  default-language:    Haskell2010
  extra-libraries:     gsl gslcblas m
  ghc-options:         -Wall

  if flag(gsl-example)
    buildable: True
    build-depends:     base >=4 && <5
                     , inline-c
                     , vector
                     , Chart
                     , Chart-cairo
  else
    buildable: False

You should fileI just filed a bug with inline-c as that's the real culprit here

tebello-thejane commented 9 years ago

What I'm trying to get at with this issue report is: why does constraining the Chart version in inline-c cause cabal to choose vector-0.10.* instead of vector-0.11.*?

tebello-thejane commented 9 years ago

Why is the latest vector incompatible with the latest chart and mono-traversable? Which if these packages needs to be updated to rectify this?

hvr commented 9 years ago

Because Chart >= 1.3 and vector >= 0.11 isn't satisfiable simultaneously. In fact, these two constraints are part of the minimal unsatisfiable core of the current Hackage db considered as a constraint database

hvr commented 9 years ago

Chart needs to be tested against vector >= 0.11 and if necessary adapted, and then the upper bound specified in Chart can be relaxed to allow vector-0.11

tebello-thejane commented 9 years ago

Ah, I see that the upper-bound constraint is in Chart. Looks like these two issues (Chart and mono-traversable) were probably unrelated.

Thanks.