Skip to content

Is working with private versions of Hackage supported/possible? #445

@adinapoli

Description

@adinapoli

Hello all,

sorry if there is already a duplicated issue somewhere, weren't able to find it.

I am trying to port an existing project I have at work to use stack. The requisite is that I want to make this as less intrusive as possible, to try to convince later on the rest of the team to switch, proved stack is the correct tool for us. In doing so, I need stack to full interoperate with our private version of Hackage, which is hosted in a VPS and it's where we upload all our in-house, proprietary packages.

I have dutifully followed the FAQ, which suggest to add the package-indices section to my stack.yml, which now looks like this:

resolver: ghc-7.10
packages:
  - '.'
package-indices:
  - name: Our Private Hackage
    download-prefix: http://path-to-our-private-hackage/package/
    http: http://path-to-our-private-hackage/00-index.tar.gz
extra-deps: []

My expectation would be for stack to honour this and then bring "in scope" our in-house packages. But when I try to run stack build --flag chronos:development (incidentally is this the equivalent of calling cabal build -fdevelopment ?) I get (Sorry for the deluge of output!):

While constructing the BuildPlan the following exceptions were encountered:

--  While attempting to add dependency,
    Could not find package MonadCatchIO-transformers in known packages

--  While attempting to add dependency,
    Could not find package aeson in known packages

--  While attempting to add dependency,
    Could not find package ansi-terminal in known packages

--  While attempting to add dependency,
    Could not find package api-tools in known packages

--  While attempting to add dependency,
    Could not find package async in known packages

--  While attempting to add dependency,
    Could not find package atlas in known packages

--  While attempting to add dependency,
    Could not find package attoparsec in known packages

--  While attempting to add dependency,
    Could not find package attoparsec-conduit in known packages

--  While attempting to add dependency,
    Could not find package blaze-builder in known packages

--  While attempting to add dependency,
    Could not find package blaze-html in known packages

--  While attempting to add dependency,
    Could not find package blaze-markup in known packages

--  While attempting to add dependency,
    Could not find package case-insensitive in known packages

--  Failure when adding dependencies:    
      MonadCatchIO-transformers: needed (>=0.3.0.0), but not present in build plan, latest is 0.3.1.3
      aeson: needed (>=0.6.2.0), but not present in build plan, latest is 0.9.0.1
      ansi-terminal: needed (>=0.6), but not present in build plan, latest is 0.6.2.1
      api-tools: needed (>=0.1.1), but not present in build plan, latest is 0.5.2
      async: needed (>=2.0.1.0), but not present in build plan, latest is 2.0.2
      atlas: needed (==1.0.9.3), but not present in build plan, latest is 1.0.11.0
      attoparsec: needed (>=0.10.4.0), but not present in build plan, latest is 0.13.0.0
      attoparsec-conduit: needed (>=1.0.1.2), but not present in build plan, latest is 1.1.0
      blaze-builder: needed (<0.4), but not present in build plan, latest is 0.4.0.1
      blaze-html: needed (>=0.6.1.1), but not present in build plan, latest is 0.8.0.2
      blaze-markup: needed (>=0.5.2.1), but not present in build plan, latest is 0.7.0.2
      case-insensitive: needed (>=1.1.0.3), but not present in build plan, latest is 1.2.0.4
      conduit: needed (>=1.0.8), but not present in build plan, latest is 1.2.4.2
      conduit-extra: needed (-any), but not present in build plan, latest is 1.1.9
      configurator: needed (>=0.2.0.2), but not present in build plan, latest is 0.3.0.0
      data-default: needed (>=0.5.3), but not present in build plan, latest is 0.5.3
      digestive-functors: needed (>=0.6.2.0), but not present in build plan, latest is 0.8.0.0
      digestive-functors-blaze: needed (>=0.6.0.2), but not present in build plan, latest is 0.6.0.6
      digestive-functors-heist: needed (>=0.8.4.0), but not present in build plan, latest is 0.8.6.2
      digestive-functors-snap: needed (>=0.6.0.1), but not present in build plan, latest is 0.6.1.3
      either: needed (>=4.0), but not present in build plan, latest is 4.4.1
      ekg: needed (>=0.3.1.3), but not present in build plan, latest is 0.4.0.6
      fay: needed (-any), but not present in build plan, latest is 0.23.1.6
      fay-jquery: needed (-any), but not present in build plan, latest is 0.6.0.3
      fay-text: needed (-any), but not present in build plan, latest is 0.3.2.2
      heist: needed (>=0.13 && <0.15), but not present in build plan, latest is 0.14.1
      hermes: needed (>=0.13.7.1 && <0.14.0.0), but not present in build plan, latest is 0.14.0.0
      http-conduit: needed (>=2.0.0.10), but not present in build plan, latest is 2.1.5
      http-types: needed (>=0.8.5), but not present in build plan, latest is 0.8.6
      lens: needed (<5.0), but not present in build plan, latest is 4.11
      map-syntax: needed (-any), but not present in build plan, latest is 0.2
      mtl: needed (>=2.1), but not present in build plan, latest is 2.2.1
      network: needed (>=2.4), but not present in build plan, latest is 2.6.2.0
      old-locale: needed (-any), but not present in build plan, latest is 1.0.0.7
      postmark: needed (>=0.1.1), but not present in build plan, latest is 0.1.1
      random: needed (>=1.0), but not present in build plan, latest is 1.1
      raw-strings-qq: needed (-any), but not present in build plan, latest is 1.0.2
      resourcet: needed (>=0.3), but not present in build plan, latest is 1.1.5
      safe: needed (>=0.3.3), but not present in build plan, latest is 0.3.9
      shelly: needed (>=1.5.2 && >=1.3.1), but not present in build plan, latest is 1.6.2.5
      snap: needed (>=0.13.0), but not present in build plan, latest is 0.14.0.5
      snap-core: needed (>=0.9.3), but not present in build plan, latest is 0.9.7.0
      snap-loader-dynamic: needed (>=0.10), but not present in build plan, latest is 0.10.0.3
      snap-loader-static: needed (>=0.9.0), but not present in build plan, latest is 0.9.0.2
      snap-server: needed (>=0.9.3), but not present in build plan, latest is 0.9.5.1
      snaplet-fay: needed (>=0.3.3.7), but not present in build plan, latest is 0.3.3.12
      snaplet-postgresql-simple: needed (>=0.5), but not present in build plan, latest is 0.6.0.2
      snaplet-purescript: needed (>=0.2.0.0), but not present in build plan, latest is 0.2.0.0
      text: needed (>=0.11 && >=0.11), but not present in build plan, latest is 1.2.1.1
      text-format: needed (>=0.3.1.0), but not present in build plan, latest is 0.3.1.1
      tls: needed (>=1.2.2), but not present in build plan, latest is 1.3.1
      unordered-containers: needed (>=0.2.3.3), but not present in build plan, latest is 0.2.5.1
      xmlhtml: needed (>=0.2.3), but not present in build plan, latest is 0.2.3.4
    needed for package: chronos-0.13.7.0

--  While attempting to add dependency,
    Could not find package conduit in known packages

--  While attempting to add dependency,
    Could not find package conduit-extra in known packages

--  While attempting to add dependency,
    Could not find package configurator in known packages

--  While attempting to add dependency,
    Could not find package data-default in known packages

--  While attempting to add dependency,
    Could not find package digestive-functors in known packages

--  While attempting to add dependency,
    Could not find package digestive-functors-blaze in known packages

--  While attempting to add dependency,
    Could not find package digestive-functors-heist in known packages

--  While attempting to add dependency,
    Could not find package digestive-functors-snap in known packages

--  While attempting to add dependency,
    Could not find package either in known packages

--  While attempting to add dependency,
    Could not find package ekg in known packages

--  While attempting to add dependency,
    Could not find package fay in known packages

--  While attempting to add dependency,
    Could not find package fay-jquery in known packages

--  While attempting to add dependency,
    Could not find package fay-text in known packages

--  While attempting to add dependency,
    Could not find package heist in known packages

--  While attempting to add dependency,
    Could not find package hermes in known packages

--  While attempting to add dependency,
    Could not find package http-conduit in known packages

--  While attempting to add dependency,
    Could not find package http-types in known packages

--  While attempting to add dependency,
    Could not find package lens in known packages

--  While attempting to add dependency,
    Could not find package map-syntax in known packages

--  While attempting to add dependency,
    Could not find package mtl in known packages

--  While attempting to add dependency,
    Could not find package network in known packages

--  While attempting to add dependency,
    Could not find package old-locale in known packages

--  While attempting to add dependency,
    Could not find package postmark in known packages

--  While attempting to add dependency,
    Could not find package random in known packages

--  While attempting to add dependency,
    Could not find package raw-strings-qq in known packages

--  While attempting to add dependency,
    Could not find package resourcet in known packages

--  While attempting to add dependency,
    Could not find package safe in known packages

--  While attempting to add dependency,
    Could not find package shelly in known packages

--  While attempting to add dependency,
    Could not find package snap in known packages

--  While attempting to add dependency,
    Could not find package snap-core in known packages

--  While attempting to add dependency,
    Could not find package snap-loader-dynamic in known packages

--  While attempting to add dependency,
    Could not find package snap-loader-static in known packages

--  While attempting to add dependency,
    Could not find package snap-server in known packages

--  While attempting to add dependency,
    Could not find package snaplet-fay in known packages

--  While attempting to add dependency,
    Could not find package snaplet-postgresql-simple in known packages

--  While attempting to add dependency,
    Could not find package snaplet-purescript in known packages

--  While attempting to add dependency,
    Could not find package text in known packages

--  While attempting to add dependency,
    Could not find package text-format in known packages

--  While attempting to add dependency,
    Could not find package tls in known packages

--  While attempting to add dependency,
    Could not find package unordered-containers in known packages

--  While attempting to add dependency,
    Could not find package xmlhtml in known packages

Recommended action: try adding the following to your extra-deps in /Users/adinapoli/work/chronos/stack.yaml
- MonadCatchIO-transformers-0.3.1.3
- aeson-0.9.0.1
- ansi-terminal-0.6.2.1
- api-tools-0.5.2
- async-2.0.2
- atlas-1.0.11.0
- attoparsec-0.13.0.0
- attoparsec-conduit-1.1.0
- blaze-builder-0.4.0.1
- blaze-html-0.8.0.2
- blaze-markup-0.7.0.2
- case-insensitive-1.2.0.4
- conduit-1.2.4.2
- conduit-extra-1.1.9
- configurator-0.3.0.0
- data-default-0.5.3
- digestive-functors-0.8.0.0
- digestive-functors-blaze-0.6.0.6
- digestive-functors-heist-0.8.6.2
- digestive-functors-snap-0.6.1.3
- either-4.4.1
- ekg-0.4.0.6
- fay-0.23.1.6
- fay-jquery-0.6.0.3
- fay-text-0.3.2.2
- heist-0.14.1
- hermes-0.14.0.0
- http-conduit-2.1.5
- http-types-0.8.6
- lens-4.11
- map-syntax-0.2
- mtl-2.2.1
- network-2.6.2.0
- old-locale-1.0.0.7
- postmark-0.1.1
- random-1.1
- raw-strings-qq-1.0.2
- resourcet-1.1.5
- safe-0.3.9
- shelly-1.6.2.5
- snap-0.14.0.5
- snap-core-0.9.7.0
- snap-loader-dynamic-0.10.0.3
- snap-loader-static-0.9.0.2
- snap-server-0.9.5.1
- snaplet-fay-0.3.3.12
- snaplet-postgresql-simple-0.6.0.2
- snaplet-purescript-0.2.0.0
- text-1.2.1.1
- text-format-0.3.1.1
- tls-1.3.1
- unordered-containers-0.2.5.1
- xmlhtml-0.2.3.4

You may also want to try the 'stack solver' command

I have also tried to run stack init --solver, but without much luck either:

☁  chronos [issue-448] ⚡ stack init --solver
Writing default config file to: /Users/adinapoli/work/chronos/stack.yaml
Basing on cabal files:
- /Users/adinapoli/work/chronos/chronos.cabal

Asking cabal to calculate a build plan, please wait
Running /usr/hs/bin/cabal --config-file=/var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/cabal-solver49779/cabal.config install -v --dry-run --only-dependencies --reorder-goals --max-backjumps=-1 --package-db=clear --package-db=global /Users/adinapoli/work/chronos/ exited with ExitFailure 1
/usr/hs/bin/alex --version
/Users/adinapoli/Library/Haskell/bin/cpphs --version
/usr/bin/gcc -dumpversion
/Users/adinapoli/.cabal/bin/ghcjs --numeric-ghcjs-version
/Users/adinapoli/.cabal/bin/ghcjs-pkg --ghcjs-version
/usr/hs/bin/haddock --version
/usr/hs/bin/happy --version
/usr/hs/bin/hpc version
looking for tool hsc2hs near compiler in /usr/hs/bin
found hsc2hs in /usr/hs/bin/hsc2hs
/usr/hs/bin/hsc2hs --version
/Users/adinapoli/.cabal/bin/HsColour -version
/usr/hs/bin/ghc -c /var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/49786.c -o /var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/49786.o
/usr/bin/ld -x -r /var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/49786.o -o /var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/49787.o
/usr/local/bin/pkg-config --version
Warning: cannot determine version of /usr/bin/strip :
""
/usr/bin/tar --help
Reading available packages...
Updating the index cache file...
Choosing modular solver.
Resolving dependencies...
cabal-1.22.0.1: Could not resolve dependencies:
trying: chronos-0.13.7.0 (user goal)
next goal: hermes (dependency of chronos-0.13.7.0)
Dependency tree exhaustively searched.
cabal --config-file=/var/folders/js/cv_q5mqd6_g76353vq_n4nqc0000gn/T/cabal-solver49779/cabal.config: /usr/hs/tools/cabal-1.22.0.1 failure (return code=1)

Here hermes is our proprietary package, available only on our private Hackage.

Any idea?

Thanks!
Alfredo

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions