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

Change command for running examples in README #393

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pbrinkmeier
Copy link
Contributor

@pbrinkmeier pbrinkmeier commented Apr 3, 2024

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.

README.md Outdated Show resolved Hide resolved
README.md Outdated
```bash
stack exec -- scotty-basic
$ cabal run scotty-basic
Setting phasers to stun... (port 3000) (ctrl-c to quit)
Copy link
Collaborator

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?

Copy link
Contributor Author

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

Copy link
Collaborator

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.

Copy link
Contributor Author

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.

@pbrinkmeier
Copy link
Contributor Author

Hey, what's your opinion here? Should we add a stack.yaml to make it possible to do stack run or maybe add a hint for Stack users that it won't work out of the box even though it's compatible?

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

Successfully merging this pull request may close these issues.

2 participants