build-depends on versions of packages incompatible with modern base
Closed this issue · 9 comments
~/prog$ git clone https://github.com/geophf/1HaskellADay.git
Cloning into '1HaskellADay'...
remote: Counting objects: 1902, done.
remote: Compressing objects: 100% (109/109), done.
remote: Total 1902 (delta 60), reused 0 (delta 0), pack-reused 1773
Receiving objects: 100% (1902/1902), 462.71 KiB | 0 bytes/s, done.
Resolving deltas: 100% (759/759), done.
Checking connectivity... done.
~/prog$ cd 1HaskellADay/
~/prog/1HaskellADay$ cabal sandbox init
Writing a default package environment file to
/home/username/prog/1HaskellADay/cabal.sandbox.config
Creating a new sandbox at /home/username/prog/1HaskellADay/.cabal-sandbox
~/prog/1HaskellADay$ cabal repl
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
trying: HAD-0.3.0.1 (user goal)
next goal: process (dependency of HAD-0.3.0.1)
rejecting: process-1.4.2.0/installed-1.4... (conflict: HAD => process==1.1.*)
Dependency tree exhaustively searched.
Trying configure anyway.
Configuring HAD-0.3.0.1...
cabal: Encountered missing dependencies:
QuickCheck >=2.6,
doctest ==0.9.*,
filepath ==1.3.*,
process ==1.1.*,
time ==1.4.*
~/prog/1HaskellADay$ cabal install --dependencies-only
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: base-4.9.0.0/installed-4.9... (dependency of HAD-0.3.0.1)
next goal: process (dependency of HAD-0.3.0.1)
rejecting: process-1.4.2.0/installed-1.4..., process-1.4.2.0, process-1.4.1.0,
process-1.4.0.0, process-1.3.0.0, process-1.2.3.0, process-1.2.2.0,
process-1.2.1.0, process-1.2.0.0 (conflict: HAD => process==1.1.*)
rejecting: process-1.1.0.2 (conflict: base==4.9.0.0/installed-4.9..., process
=> base>=4 && <4.7 || >=3 && <4)
trying: process-1.1.0.1
next goal: directory (dependency of process-1.1.0.1)
rejecting: directory-1.2.6.2/installed-1.2..., directory-1.2.7.0,
directory-1.2.6.3, directory-1.2.6.2, directory-1.2.5.1, directory-1.2.5.0,
directory-1.2.4.0, directory-1.2.3.1, directory-1.2.3.0, directory-1.2.2.1,
directory-1.2.2.0, directory-1.2.1.0, directory-1.2.0.1, directory-1.2.0.0
(conflict: process => directory>=1.0 && <1.2)
rejecting: directory-1.1.0.2 (conflict: base==4.9.0.0/installed-4.9...,
directory => base>=4.4 && <4.6)
rejecting: directory-1.1.0.1 (conflict: base==4.9.0.0/installed-4.9...,
directory => base>=4.2 && <4.5)
rejecting: directory-1.1.0.0, directory-1.0.1.2 (conflict:
base==4.9.0.0/installed-4.9..., directory => base>=4.2 && <4.4)
rejecting: directory-1.0.1.1, directory-1.0.1.0 (conflict:
base==4.9.0.0/installed-4.9..., directory => base>=4.1 && <4.3)
rejecting: directory-1.0.0.3, directory-1.0.0.0 (conflict:
base==4.9.0.0/installed-4.9..., directory => base<4.3)
rejecting: directory-1.2.6.1 (conflict: process => directory>=1.0 && <1.2)
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.
~/prog/1HaskellADay$
I have the same problem, i can't install :( I suppose that we need a specific version of the compiler? Maybe adding a Stack file would help in automatically providing the user with an older version?
"I have the same problem, i can't install :("
I can't either.
Switching to Stack would be helpful, I'm a Haskell newbie and was only thought Stack.
@geophf if you write us your versions this can save us a lot of time ... then we can do the plumbing ourselves
hm. I don't do any of this. I simply run the exercise and solution against the libraries under exercises/HAD/
Well, FWIW, I try to follow the "Getting started" topic on the README and running ghci
emits some errors:
➜ 1HaskellADay git:(master) ghci
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
<no location info>: error:
Could not find module ‘Test.DocTest’
It is not a module in the current program, or in any known package.
[1 of 2] Compiling HAD.Date ( src/HAD/Date.hs, interpreted )
[2 of 2] Compiling HAD ( src/HAD.hs, interpreted )
src/HAD.hs:13:1: error:
Could not find module ‘Test.DocTest’
Use -v to see a list of the files searched for.
|
13 | import Test.DocTest (doctest)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Failed, 1 module loaded.
Loaded GHCi configuration from /Users/andre/work/vc/1HaskellADay/.ghci
>>>
Leaving GHCi.
let's see whether i can run a solution successfully. at first when running ghci
i found the same error @edevil had, which i fixed by installing doctest
globally. then in directory Y2017/M09/D01/
i copied Solution.hs
to Exercise.hs
and renamed the module so that it ends in Exercise
rather than Solution
. then i got an error because check
expected the module name to start with HAD
.
when adding HAD
to the beginning of the module i get a lot of errors about libraries missing, here is a sample:
exercises/HAD/Y2017/M09/D01/Exercise.hs:19:8:
Could not find module ‘Wikidata.Query.Aeson’
Use -v to see a list of the files searched for.
exercises/HAD/Y2017/M09/D01/Exercise.hs:20:8:
Could not find module ‘Wikidata.Query.Endpoint’
Use -v to see a list of the files searched for.
exercises/HAD/Y2017/M09/D01/Exercise.hs:22:8:
Could not find module ‘Y2017.M08.D31.Solution’
Use -v to see a list of the files searched for.
so the solution file was initially lacking the HAD.
prefix, and all its dependencies seem to be lacking it as well. i would think that the author is importing these modules from the HAD
dir, but the .ghci
file is one level up 🤔
Actually, don't check out #5 :)
Just merged in a request that elides the HAD prefix so that exercises and solutions now compile with the Ydddd prefix