-
Notifications
You must be signed in to change notification settings - Fork 133
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
Change command for running examples in README #393
base: master
Are you sure you want to change the base?
Conversation
c74073e
to
3b12936
Compare
README.md
Outdated
```bash | ||
stack exec -- scotty-basic | ||
$ cabal run scotty-basic | ||
Setting phasers to stun... (port 3000) (ctrl-c to quit) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you keep the stack example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command does not work when I test it in a recent fresh haskell
Docker container. stack run [...]
does, but only if a stack.yaml
is present. If we keep this I'd suggest adding a stack.yaml
file too so that it works out of the box, thoughts (see #390)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, adding a stack.yaml
is not a good practice because it forces a fixed resolver on the users.
Indeed, I agree that the current stack example is not self-contained because it assumes a stack init && stack build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stack run -- scotty-basic
works without stack build
before but still requires a stack.yaml
. I can try whether stack init && stack run ...
works though. I guess for their own projects people can use whichever tool they want anyways.
Hey, what's your opinion here? Should we add a |
Addresses #390
This works in a fresh
haskell:9.6.4-lite
Docker container and will download necessary dependencies. It should continue to work for the foreseeable future. There's some minor formatting changes too, let me know if they're okay with you.