google / codeworld

Educational computer programming environment using Haskell
http://code.world
Apache License 2.0
1.24k stars 196 forks source link

cabal: Could not resolve dependencies: [__0] trying: codeworld-server-0.1 (user goal) #1224

Closed liuhui2010518 closed 4 years ago

liuhui2010518 commented 4 years ago

Warning: CodeWorld.App2: could not find link destinations for: Double Int IO Warning: CodeWorld.App: could not find link destinations for: Double Int IO StdGen Documentation created: dist/doc/html/codeworld-api/codeworld-api.txt ===== RUNNING: cabal_install ./codeworld-server ./codeworld-error-sanitizer ./codeworld-compiler ./codeworld-requirements ./codeworld-game-api ./codeworld-prediction ./codeworld-api ./codeworld-game-server ./codeworld-account ./codeworld-auth Warning: the --global flag is deprecated -- it is generally considered a bad idea to install packages into the global store Resolving dependencies... cabal: Could not resolve dependencies: [0] trying: codeworld-server-0.1 (user goal) [1] unknown package: ormolu (dependency of codeworld-server) [__1] fail (backjumping, conflict set: codeworld-server, ormolu) After searching the rest of the dependency tree exhaustively, these were the goals I've had most trouble fulfilling: codeworld-server, ormolu

cdsmith commented 4 years ago

Perhaps you need to run cabal update? ormolu is definitely in hackage, and has been since Oct 11.

liuhui2010518 commented 4 years ago

Perhaps you need to run cabal update? ormolu is definitely in hackage, and has been since Oct 11.

Thank you for your quick reply. It seems that I choose a not stable branch, reflexdebug branch works well.

cdsmith commented 4 years ago

The reflexdebug branch is pretty old. The problem here isn't that CodeWorld isn't working; it's that you're using an old package database that doesn't know about ormolu. You should be able to run (. base.sh && cabal update) from the codeworld directory to fix that, and still use master.

liuhui2010518 commented 4 years ago

Got it, master works well after compiling to follow you instruction . I use a CDN codemirror.js, cause codemirror-compressed.js compilation failed In my browser。After that, everthing looks well. Thank you for your help.

cdsmith commented 4 years ago

Okay. Feel free to file another bug for the codemirror failure. I'll close this one.

cdsmith commented 4 years ago

I'm reopening this because I'm getting a similar failure running docker build from HEAD on a fresh machine.

===== RUNNING: cabal_install ./codeworld-server ./codeworld-error-sanitizer ./codeworld-compiler ./codeworld-requirements ./codeworld-game-api ./codeworld-prediction ./codeworld-api ./codeworld-game-server ./codeworld-account ./codeworld-auth
Warning: the --global flag is deprecated -- it is generally considered a bad
idea to install packages into the global store
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: codeworld-server-0.1 (user goal)
[__1] unknown package: ormolu (dependency of codeworld-server)
[__1] fail (backjumping, conflict set: codeworld-server, ormolu)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: codeworld-server, ormolu

This is strange, because ormolu is definitely on hackage.

cdsmith commented 4 years ago

Okay, the problem is this in install.sh:

cabal update --index-state='2019-09-28T01:46:00Z'

That was presumably added to work around a dependency problem, but it excludes ormolu.