Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"unknown command ':livereload'" #15

Open
reubenharry opened this issue Apr 11, 2023 · 5 comments
Open

"unknown command ':livereload'" #15

reubenharry opened this issue Apr 11, 2023 · 5 comments

Comments

@reubenharry
Copy link

(Running on ubuntu)

Installation works, and cabal run essence-of-live-coding-tutorial works as expected, but run I run ghcid, I see "unknown command ':livereload'", and no gloss window appearing (or localhost running).

Is this a known issue?

@turion
Copy link
Owner

turion commented Apr 12, 2023

Do you do nix-shell first? Or do you install the dependencies differently?

I have different problems...

$ ghcid
Loading cabal repl ...
Warning: The package list for 'hackage.haskell.org' is 53 days old.
Run 'cabal update' to get the latest list of available packages.
Warning: Parsing the index cache failed (Data.Binary.Get.runGet at position
16: Non-matching structured hashes: f46da61e7afa58a5e8fd1d2b6fb79899;
expected: a257ca064dfb5e0cb74f74e64a975b9e). Trying to regenerate the index
cache...
Resolving dependencies...
Build profile: -w ghc-8.8.4 -O1
In order, the following will be built (use -v for more details):
 - essence-of-live-coding-tutorial-0.2.4 (exe:essence-of-live-coding-tutorial) (first run)
Configuring executable 'essence-of-live-coding-tutorial' for essence-of-live-coding-tutorial-0.2.4..
Preprocessing executable 'essence-of-live-coding-tutorial' for essence-of-live-coding-tutorial-0.2.4..
GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/turion/haskell/essence-of-live-coding-tutorial/.ghci
[1 of 1] Compiling Main             ( Main.hs, interpreted )
Ok, one module loaded.
Command "cabal repl" exited unexpectedly with error message:

(Yes, no error message follows.)

$ cabal repl
Warning: The package list for 'hackage.haskell.org' is 53 days old.
Run 'cabal update' to get the latest list of available packages.
Resolving dependencies...
Build profile: -w ghc-8.8.4 -O1
In order, the following will be built (use -v for more details):
 - essence-of-live-coding-tutorial-0.2.4 (exe:essence-of-live-coding-tutorial) (first run)
Preprocessing executable 'essence-of-live-coding-tutorial' for essence-of-live-coding-tutorial-0.2.4..
GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/turion/haskell/essence-of-live-coding-tutorial/.ghci
[1 of 1] Compiling Main             ( Main.hs, interpreted )
Ok, one module loaded.
*Main LiveCoding LiveCoding.GHCi> 
Leaving GHCi.

cabal run and cabal repl fail:

$ cabal repl
Build profile: -w ghc-8.8.4 -O1
In order, the following will be built (use -v for more details):
 - essence-of-live-coding-tutorial-0.2.4 (exe:essence-of-live-coding-tutorial) (ephemeral targets)
Preprocessing executable 'essence-of-live-coding-tutorial' for essence-of-live-coding-tutorial-0.2.4..
GHCi, version 8.8.4: https://www.haskell.org/ghc/  :? for help
Loaded GHCi configuration from /home/turion/haskell/essence-of-live-coding-tutorial/.ghci
[1 of 1] Compiling Main             ( Main.hs, interpreted )
Ok, one module loaded.
*Main LiveCoding LiveCoding.GHCi> :live
:liveinit    :livelaunch  :livereload  :livestep    :livestop
*Main LiveCoding LiveCoding.GHCi> :live
:liveinit    :livelaunch  :livereload  :livestep    :livestop
*Main LiveCoding LiveCoding.GHCi> :livelaunch 
*Main LiveCoding LiveCoding.GHCi> freeglut (<interactive>):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow
cabal: repl failed for exe:essence-of-live-coding-tutorial from
essence-of-live-coding-tutorial-0.2.4.

But I think I can get rid of all these problems by switching to flakes.

@turion
Copy link
Owner

turion commented Apr 12, 2023

@reubenharry can you try #16?

@reubenharry
Copy link
Author

I'm a nix novice, but I took this to mean:

  1. Run `nix develop --extra-experimental-features 'flakes nix-command'
  2. Run ghcid

Doing that didn't throw an error, but I still don't see the gloss window appear, and see the unknown command message

@turion
Copy link
Owner

turion commented Apr 13, 2023

What happens if you do nix develop (plus extra stuff you figured out) and then cabal repl? Can you do :livelaunch and then :livereload? Maybe there is an error message on the way there that gets suppressed by ghcid?

@reubenharry
Copy link
Author

I get: unknown command ':livelaunch' and same for livereload.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants