callum-oakley / gotta-go-fast

A command line utility for practicing typing and measuring your WPM and accuracy.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Failure to install via `stack install gotta-go-fast`

jhrcek opened this issue · comments

I tried to install this tool by running stack install gotta-go-fast (without this repo checked out, I assume it installs from hackage or something) and it failed with the following error:

gotta-go-fast> /tmp/stack-0e24cae749713f82/gotta-go-fast-0.3.0.0/src/Main.hs:85:20: error:
gotta-go-fast>     • Exception when trying to run compile-time code:
gotta-go-fast>         details.txt: openFile: does not exist (No such file or directory)
gotta-go-fast>       Code: embedStringFile "details.txt"
gotta-go-fast>     • In the untyped splice: $(embedStringFile "details.txt")
gotta-go-fast>    |
gotta-go-fast> 85 |   (details $ lines $(embedStringFile "details.txt"))
gotta-go-fast>    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
gotta-go-fast>

I checked the cabal file of this project and so that details.txt is not included.
I think you should be able to include that file into cabal source distribution by adding something like the following into your cabal file

extra-source-files: details.txt, wordWeights.txt

See https://cabal.readthedocs.io/en/3.4/cabal-package.html?highlight=extra-source-files#pkg-field-extra-source-files

Thanks for catching this! I think it should be working now.