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

Use Stack for Grenade #36

Closed
wants to merge 4 commits into from

Conversation

cpennington
Copy link

I rebased #29 onto the latest version of grenade, and updated the version of hedgehog in stack.yaml. I use stack (like @varosi), and have validated that the setup works (on Linux, in my case).

@HuwCampbell
Copy link
Owner

Happy for people to use stack. I would prefer to keep autogenerated cruft to a minimum if that's ok though.

I think the only thing which isn't possible with a stack init is the hedgehog dependency. But, that should be solved by bumping it to 0.5 (which is on stackage) I believe.

I'll do that first and we can revisit.

@@ -1,5 +1,4 @@
Grenade
=======
# Grenade
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reformatting probably isn't necessary.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it wasn't necessary, but it made it easier to work in the documentation without having to hunt around for the correct horizontal bar character for each level.

@cpennington
Copy link
Author

I'm not sure which parts you mean are 'autogenerated cruft'? stack.yaml was autogenerated, but it's intended to be checked in and evolved over time as needed. Would you feel better about it if I pruned out all of the documentation and stripped it down to just actual specific configuration?

@eschnett
Copy link

I'd like to weigh in in @cpennington's favour. stack.yaml is not a file that's auto-generated from other repository content -- it is only auto-generated when a package is created (or converted to using stack). stack.yaml describes how dependencies should be resolved, and one of its main features is that the same stack.yaml file will continue to work (and help correctly resolve dependencies) for the years to come, even if other packages on Hackage get updated.

Put differently: The main point of a stack.yaml file is that is isn't auto-generated whenever someone downloads the repository, but that it stays fixed at a known-to-work version.

Yes, I'd remove the instructions and comments from the stack.yaml file.

@HuwCampbell
Copy link
Owner

The issue I have is that while I see that stack can be useful for building applications and managing dependencies which are not on Hackage, I believe it and its curated snapshots can paper over real problems when building libraries, which can potentially hurt cabal users, or those wishing to use packages beyond the snapshot.

I don't think there is an ideal solution, dependency management is not a solved problem. Stack has definitely helped a lot of people come to Haskell without having to worry about it as much; but it's a big hammer.

I would like grenade to be in a place where it can build out of the box with cabal, and be one stack init away from building with stack as well.

@eschnett
Copy link

@HuwCampbell Okay (and I won't argue for including a stack.yaml in grenade any more).

Out of personal interest (and maybe you want to reply in private): What problems can occur when building libraries?

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.

None yet

4 participants