scotty icon indicating copy to clipboard operation
scotty copied to clipboard

runhaskell doesn't work reliably for all users. Update quickstart in the README

Open ocramz opened this issue 11 months ago • 2 comments

We should point users to stack or cabal.

See #389

ocramz avatar Mar 23 '24 07:03 ocramz

Hi, I investigated this a little. The readme currently contains this passage:


Run /basic.hs to see Scotty in action:

runghc examples/basic.hs

Setting phasers to stun... (port 3000) (ctrl-c to quit)

Or equivalently with stack:

stack exec -- scotty-basic

My results (using the haskell:9.6.4-slim Docker container):

  • runghc doesn't work without installing dependencies globally
  • stack exec -- scotty-basic doesn't work (anymore perhaps?)

What works:

  • cabal update && cabal run scotty-basic
  • stack run -- scotty-basic, but this requires a stack.yaml with the following content:
resolver:
  url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/15.yaml

packages:
- .
- examples

I.e. more maintenance work to keep this up to date. There might be another way to get stack to behave but I don't know it that well.

I'd suggest to just change it to cabal run scotty-basic with like a line or two saying that it will take a minute when running it the first time. I can prepare a PR for this :)

pbrinkmeier avatar Apr 02 '24 14:04 pbrinkmeier

@pbrinkmeier A PR would be very appreciated!

ocramz avatar Apr 02 '24 19:04 ocramz