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

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

Open
ocramz opened this issue Mar 23, 2024 · 2 comments

Comments

@ocramz
Copy link
Collaborator

ocramz commented Mar 23, 2024

We should point users to stack or cabal.

See #389

@pbrinkmeier
Copy link
Contributor

pbrinkmeier commented Apr 2, 2024

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 :)

@ocramz
Copy link
Collaborator Author

ocramz commented Apr 2, 2024

@pbrinkmeier A PR would be very appreciated!

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

No branches or pull requests

2 participants