Tidal not booting - "Could not find module ‘Sound.Tidal.Context’"

Hi !

It's been a while, I tried installing Tidal on a new Linux Fedora 38 install, but I get a weird behaviour.

When I run the following commands, it seems to work just fine :

$ which ghci
/usr/bin/ghci
$ ghci
Loaded package environment from /home/suzanne/.ghc/x86_64-linux-9.2.6/environments/default
GHCi, version 9.2.6: https://www.haskell.org/ghc/  :? for help
ghci> import Sound.Tidal.Context
ghci> tidal_version
"1.9.4"

But when I open VSCode, and try to eval a line, I get a notification saying "Configured ghci path was not found", a version that doesn't match (GHCi, version 9.2.7: https://www.haskell.org/ghc/ :? for help) and finally the following error message : Could not find module ‘Sound.Tidal.Context’....

I also tried Pulsar, same thing happens when I try to boot Tidal.

I tried setting my ghci path in both apps to /usr/bin/ghci, nothing changes.

Any idea on how to solve this ? Do I have conflicting ghci versions and if so what should I do ? Should I try installing tidal with stack ?

Also, I'm not sure whether I should add more details in this topic's title, in case my issue is Fedora-specific, feel free to suggest/edit.

More version numbers :

$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.3.0 of the Cabal library 
$ ghcup --version
The GHCup Haskell installer, version 0.1.19.2

Thanks ! :slightly_smiling_face:

My guess is that you have ghci 9.2.6 installed but VSCode and Pulsar are looking for ghci 9.2.7. I don't know what to expect on a Linux install, but with MacOS I have ghci installed in ~/.ghcup/bin.

Haskell lets you have multiple versions of ghci and cabal, but you need to tell it which version you want it to use when you install packages like Tidal. If you know you want to use ghci 9.2.6, set it to that version, then install the tidal package to that version.

ghcup set ghc 9.2.6
cabal update
cabal v1-install tidal

If that doesn't work, give the full message you get from Pulsar when you try to start Tidal.

1 Like

Thanks !
I tried that, but I get the following error in Pulsar :

Reboot atom-tidalcycles plugin
Choose BootTidal.hs path
 > no custom path configured
 > not found in current directory
 > cannot get tidal installation folder Error: Command failed: "/usr/bin/ghc-pkg" field tidal data-dir
/bin/sh: line 1: /usr/bin/ghc-pkg: No such file or directory
 * use the default contained in the plugin
 * load BootTidal.hs from /home/suzanne/.pulsar/packages/tidalcycles/lib/BootTidal.hs
t> /bin/sh: line 1: /usr/bin/ghci: No such file or directory

And still this one in VSCode : "Configured GHCI path was not found: ghci", the output has changed though :

Loaded package environment from /home/suzanne/.ghc/x86_64-linux-9.2.6/environments/default
GHCi, version 9.2.6: https://www.haskell.org/ghc/  :? for help
Warning: GHCi | <command line>: cannot satisfy -package-id rts-1.0.2
Warning: GHCi |     (use -v for more information)

I just tried with stack instead, I get the same error in Pulsar

Ghci command: stack exec --package tidal ghci
Ghc-pkg command: stack exec --package tidal ghc-pkg
Cannot browse tidal to obtain informations for autocomplete: Error: Command failed: echo ":browse Sound.Tidal.Context" | stack exec --package tidal ghci
/bin/sh: line 1: stack: command not found

Could it be a permission problem with the app package ? I have installed Flatseal (for Flatpak apps on Fedora) but I'm not sure what to tweak...

EDIT : no error when using stack version with VSCode, but I don't get any output, not even a GHCi version :confused: