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 equality constraints for all dependencies in stack's executable? #3558

Closed
mgsloan opened this issue Nov 7, 2017 · 2 comments
Closed

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Nov 7, 2017

Since we sometimes want to use stack as a library, particularly in scripts (#3522), we want it to work with many dependency versions. However, particularly for releases, we want the executable to only use very specific dependency versions. In order to have cabal-install use these versions, equality constraints could be added to the executable stanza. A cabal flag would need to be added, to toggle buildability of the executable.

One downside of this approach is that stack install stack would no longer install an executable. This could potentially be resolved by having it detect the existence of a stack.yaml in the hackage package - see #2122 . It seems good to address this, because it's another way that stack could be installed without using the standard set of dependencies.

@mgsloan mgsloan added this to the P3: Optional milestone Nov 7, 2017
@borsboom
Copy link
Contributor

borsboom commented Nov 7, 2017

Hmm, I think this might be going a bit far. This would, for example, make it really hard to try an executable built with stack-nightly.yaml. I suppose we could have a flag that also toggles the equality constraints on the executable.

@mgsloan
Copy link
Contributor Author

mgsloan commented Nov 7, 2017

Yeah, I think it is more effort than it is worth.

The only way to make it practical would be to somehow hook into the hpack generation step to set the constraints on the executable. Going to go ahead and close.

@mgsloan mgsloan closed this as completed Nov 7, 2017
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