elm / package.elm-lang.org

website for browsing packages and exploring documentation
https://package.elm-lang.org/
BSD 3-Clause "New" or "Revised" License
293 stars 113 forks source link

Can't build the backend server with Cabal #346

Open manuca opened 3 years ago

manuca commented 3 years ago

Trying to build the backend server with cabal I hit some roadblocks in the process. I think I could get around some issues but others I don't know how to fix.

I tried this on macOS with: GHC 8.2.2 cabal 3.2.0.0

Missing Data.Monoid import in src/backend/Gzip.hs

The first issue I hit was multiple Variable not in scope: (<>) in this file. I got around it by adding:

import Data.Monoid ((<>))

Unsatisfied dependency when importing from Elm.Package

For this one I added elm-package as a build dependency on run-server.cabal but then I got into dependency hell and couldn't find how to fix it.

Tried both cabal new-build run-server and cabal build run-server without luck.

When I started getting conflicts I constrained http-client to >=0.3 && <0.5 but that was just the tip of the iceberg.

Here's a capture of the output.

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: run-server-1.0.0 (user goal)
[__1] next goal: http-client (dependency of run-server)
[__1] rejecting: http-client-0.7.3 (conflict: run-server => http-client>=0.3
&& <0.5)
[__1] skipping: http-client-0.7.2.1, http-client-0.7.2, http-client-0.7.1,
http-client-0.7.0, http-client-0.6.4.1, http-client-0.6.4, http-client-0.6.3,
http-client-0.6.2, http-client-0.6.1.1, http-client-0.6.1, http-client-0.6.0,
http-client-0.5.14, http-client-0.5.13.1, http-client-0.5.13,
http-client-0.5.12.1, http-client-0.5.12, http-client-0.5.11,
http-client-0.5.10, http-client-0.5.9, http-client-0.5.8, http-client-0.5.7.1,
http-client-0.5.7.0, http-client-0.5.6.1, http-client-0.5.6,
http-client-0.5.5, http-client-0.5.4, http-client-0.5.3.4,
http-client-0.5.3.3, http-client-0.5.3.2, http-client-0.5.3.1,
http-client-0.5.3, http-client-0.5.2, http-client-0.5.1, http-client-0.5.0.1,
http-client-0.5.0 (has the same characteristics that caused the previous
version to fail: excluded by constraint '>=0.3 && <0.5' from 'run-server')
[__1] trying: http-client-0.4.31.2
[__2] trying: transformers-0.5.2.0/installed-0.5.2.0 (dependency of
http-client)
[__3] trying: elm-package-0.5 (dependency of run-server)
[__4] next goal: optparse-applicative (dependency of elm-package)
[__4] rejecting: optparse-applicative-0.16.1.0 (conflict: elm-package =>
optparse-applicative>=0.8.1 && <0.11)
[__4] skipping: optparse-applicative-0.16.0.0, optparse-applicative-0.15.1.0,
optparse-applicative-0.15.0.0, optparse-applicative-0.14.3.0,
optparse-applicative-0.14.2.0, optparse-applicative-0.14.1.0,
optparse-applicative-0.14.0.0, optparse-applicative-0.13.2.0,
optparse-applicative-0.13.1.0, optparse-applicative-0.13.0.0,
optparse-applicative-0.12.1.0, optparse-applicative-0.12.0.0,
optparse-applicative-0.11.0.2, optparse-applicative-0.11.0.1,
optparse-applicative-0.11.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>=0.8.1 && <0.11' from
'elm-package')
[__4] rejecting: optparse-applicative-0.10.0, optparse-applicative-0.9.1.1,
optparse-applicative-0.9.1, optparse-applicative-0.9.0 (conflict: transformers
=> base==4.10.1.0/installed-4.10.1.0, optparse-applicative => base>=4 && <4.8)
[__4] rejecting: optparse-applicative-0.8.1 (conflict:
transformers==0.5.2.0/installed-0.5.2.0, optparse-applicative =>
transformers>=0.2 && <0.4)
[__4] skipping: optparse-applicative-0.8.0.1, optparse-applicative-0.8.0,
optparse-applicative-0.7.0.2, optparse-applicative-0.7.0.1,
optparse-applicative-0.7.0, optparse-applicative-0.6.0,
optparse-applicative-0.5.2.1, optparse-applicative-0.5.2,
optparse-applicative-0.5.1, optparse-applicative-0.5.0,
optparse-applicative-0.4.3, optparse-applicative-0.4.2,
optparse-applicative-0.4.1, optparse-applicative-0.4.0,
optparse-applicative-0.3.2, optparse-applicative-0.3.1,
optparse-applicative-0.3.0, optparse-applicative-0.2.0,
optparse-applicative-0.1.1, optparse-applicative-0.1.0 (has the same
characteristics that caused the previous version to fail: excludes
'transformers' version 0.5.2.0)
[__4] rejecting: optparse-applicative-0.0.1 (conflict: elm-package =>
optparse-applicative>=0.8.1 && <0.11)
[__4] fail (backjumping, conflict set: elm-package, optparse-applicative,
transformers)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: http-client, run-server, elm-package,
base, optparse-applicative, transformers
Try running with --minimize-conflict-set to improve the error message.