Open mjdominus opened 2 years ago
The basic issue here is that Ubuntu ships with ancient versions of cabal, stack, and ghc. Updating cabal didn't help because ghc was still too old.
I uninstalled the ubuntu cabal, stack, and ghc packages, and used ghcup https://www.haskell.org/ghcup/install/ to install recent versions of everything. After this, the cabal instructions seemed to work. (I didn't try stack.)
I will try to submit a doc patch later today.
Reviewed your patch, thanks for taking a bit of time to fix the instructions.
Regarding:
The instructions here assume that the user already knows what they are doing. I don't, but I tried anyway. I installed Nix on my system and confirmed that the daemon was running and I could run nix-shell. Then I ran nix-shell nix/shell.nix --arg tutorial true which seemed to work: it reported downloading dependencies and it gave me a nix-shell prompt. But it's not clear what to do next.
FWIW, IIRC you can just cabal build
once in that shell. And also run the doc-related stuffs, e.g make
in the doc/
directory.
The instructions at https://docs.servant.dev/en/stable/tutorial/install.html failed for me in multiple ways.
cabal-install
The
cabal new-build tutorial
command failed, sayingI figured out that this was because the Ubuntu Cabal package is from the stone age and installed cabal-3.4. But it still failed:
I didn't know how to proceed from there so I moved on to the
stack
instructions.stack
The instructions say to do
stack new myproj servant
. I got this error:At this point it's not clear how to proceed. I tried cd'ing to the
myproj
directory and runningstack build
as suggested by the next step in the instructions, but the failure was the same.nix
The instructions here assume that the user already knows what they are doing. I don't, but I tried anyway. I installed Nix on my system and confirmed that the daemon was running and I could run
nix-shell
. Then I rannix-shell nix/shell.nix --arg tutorial true
which seemed to work: it reported downloading dependencies and it gave me a nix-shell prompt. But it's not clear what to do next.Additionally
The tutorial docs at https://docs.servant.dev/en/stable/tutorial/install.html say “Copyright 2018”. The
doc/tutorial/install.rst
file was substantively updated in 2019 at commit d4289931ad69f1233c9f75f230f7bb29650df433, so the copyright ought to be at least 2019.Thanks; please let me know how I can help you resolve this issue.