thoughtbot / carnival

An unobtrusive, developer-friendly way to add comments
MIT License
499 stars 30 forks source link

Cabal hell #120

Closed chadbrewbaker closed 9 years ago

chadbrewbaker commented 9 years ago

Resolving dependencies... cabal: Could not resolve dependencies: trying: carnival-0.0.0 (user goal) rejecting: carnival-0.0.0:!test (global constraint requires opposite flag selection) trying: carnival-0.0.0:_test next goal: case-insensitive (dependency of carnival-0.0.0:_test) rejecting: case-insensitive-1.1.0.3/installed-743..., 1.2.0.3, 1.2.0.2 (global constraint requires ==1.2.0.1) trying: case-insensitive-1.2.0.1 trying: hashable-1.2.2.0/installed-45b... (dependency of case-insensitive-1.2.0.1) next goal: text (dependency of carnival-0.0.0) rejecting: text-1.1.0.0/installed-9bd..., 1.2.0.3, 1.2.0.2, 1.2.0.0 (global constraint requires ==1.1.1.3) rejecting: text-1.1.1.3 (conflict: hashable => text==1.1.0.0/installed-9bd...) rejecting: text-1.1.1.2, 1.1.1.1, 1.1.1.0, 1.1.0.1, 1.1.0.0, 1.0.0.1, 1.0.0.0, 0.11.3.1, 0.11.3.0, 0.11.2.3, 0.11.2.2, 0.11.2.1, 0.11.2.0, 0.11.1.13, 0.11.1.12, 0.11.1.11, 0.11.1.10, 0.11.1.9, 0.11.1.8, 0.11.1.7, 0.11.1.6, 0.11.1.5, 0.11.1.3, 0.11.1.2, 0.11.1.1, 0.11.1.0, 0.11.0.8, 0.11.0.7, 0.11.0.6, 0.11.0.5, 0.11.0.4, 0.11.0.3, 0.11.0.2, 0.11.0.1, 0.11.0.0, 0.10.0.2, 0.10.0.1, 0.10.0.0, 0.9.1.0, 0.9.0.1, 0.9.0.0, 0.8.1.0, 0.8.0.0, 0.7.2.1, 0.7.1.0, 0.7.0.1, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2, 0.1 (global constraint requires ==1.1.1.3) 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.

pbrisbin commented 9 years ago

Can you confirm the error still presents in a fresh sandbox?

cabal sandbox delete
./bin/setup

Thanks.

pbrisbin commented 9 years ago

Hi @chadbrewbaker, we just merged a branch changing how we build this project to use Halcyon, it may alleviate your issue. In order to try it, you have to undo anything you've previously done:

Unfortunately, our setup scripts assume access to S3 for caching build artifacts, so you won't be able to run them. Instead, you'll need to execute portions of them directly.

Follow the README up until it says to run bin/setup, then:

# Create a user-writable /app to place build artifacts in
sudo mkdir -p /app
sudo chown $USER /app

# Install halcyon itself
git clone https://github.com/mietek/halcyon.git /app/halcyon

# Don't error if ~/.ghc is present (it may or may not cause issues)
export HALCYON_INTERNAL_TOLERATE_GHC_USER_DB=1

# Build the project using Cabal 1.22
/app/halcyon/halcyon build --cabal-version=1.22.0.0

# Link in the sandbox file so we can develop in this project directory
ln -sf /app/sandbox/cabal.sandbox.config cabal.sandbox.config

# Setup Dev/Test databases
./bin/setup-db

From there, you can continue with the Developing section of the README.

I'll give some thought to making this process smoother for non-thoughtbotters.

In the event that this doesn't work, it will be a different issue. Therefore, I'm going to close this one and ask that you re-report if you run into something different with these steps.

pbrisbin commented 9 years ago

FYI: I just pushed an update that should make bin/setup work even for folks outside the thoughtbot organization (and without access to S3), so feel free to just follow the README as-is.