tweag / network-transport-zeromq

ZeroMQ transport for distributed-process (aka Cloud Haskell)
BSD 3-Clause "New" or "Revised" License
22 stars 3 forks source link

Loosen deps #27

Closed qnikst closed 10 years ago

qnikst commented 10 years ago

Allow n-t-zeromq work on a version from hackage

qnikst commented 10 years ago

@facundominguez can you review this PR, it will allow to build n-t-zeromq without using patched libraries?

facundominguez commented 10 years ago
$ cabal sandbox init
Writing a default package environment file to
/home/facundo/tweag/network-transport-zeromq/cabal.sandbox.config
Creating a new sandbox at
/home/facundo/tweag/network-transport-zeromq/.cabal-sandbox
$ cabal install --dependencies-only --enable-tests --enable-benchmarks \
    --allow-newer=mtl,ansi-terminal,network-transport \
    --with-ghc=/opt/ghc-7.8.3/bin/ghc
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: network-transport-zeromq-0.2.1 (user goal)
trying: base-4.7.0.1/installed-1a5... (dependency of
network-transport-zeromq-0.2.1)
rejecting: network-transport-zeromq-0.2.1:!test (global constraint requires
opposite flag selection)
trying: network-transport-zeromq-0.2.1:*test
next goal: network-transport-tests (dependency of
network-transport-zeromq-0.2.1:*test)
rejecting: network-transport-tests-0.1.0.1 (conflict:
base==4.7.0.1/installed-1a5..., network-transport-tests => base>=4.5 && <4.7)
rejecting: network-transport-tests-0.1.0.0 (conflict:
network-transport-zeromq-0.2.1:test => network-transport-tests>=0.1.0.1)
Dependency tree exhaustively searched.

Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.

This fixes it:

$ cabal install --dependencies-only --enable-tests --enable-benchmarks \
    --allow-newer=mtl,ansi-terminal,network-transport,base \
    --with-ghc=/opt/ghc-7.8.3/bin/ghc

Though granted that ghc-7.8.3 is a newer compiler than the one used for CI.

Update: Actually, the above is not enough to fix building with ghc-7.8.3. Maybe ignore this comment if support for ghc-7.8.3 is not intended now.

facundominguez commented 10 years ago

Shouldn't the travis configuration be updated to build and run the benchmarks which are fixed here?

qnikst commented 10 years ago

Support of old (patched) versions were dropped. Benchmarks support was introduced. Different ghc versions are tested.

facundominguez commented 10 years ago

The old tip of the branch is here: https://github.com/tweag/network-transport-zeromq/commit/7fa8ab6a4d1e8fac94fddbea96ad82fcdfdac5c5

:+1:

@qnikst: Please merge if it looks good to you. Feel free to take authorship of the last patch. I took it by accident.

qnikst commented 10 years ago

As discussed:

CONSTRAINT is not required here but it may be a good fit for the case when we will need to test against different sets of versions.

so we wait for report and it output looks nice then we keep patch with $CONSTRAINT, otherwise drop it.