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

Have something like "stack install --use-stack-yaml-from hackage-pkg"? #2122

Open
mgsloan opened this issue May 10, 2016 · 4 comments
Open

Comments

@mgsloan
Copy link
Contributor

mgsloan commented May 10, 2016

For situations like #2039 , where the user does stack install a-non-stackage-hackage-package, the issue is that we don't know what package versions to use for things outside our resolver. As discussed in that issue, one way to resolve this is to support a --solver flag and create a temporary sandbox for this particular build.

Another approach might be to actually just use the stack.yaml included with the package, if it exists. This
might be a reason to include it by default in sdists: #2105

This way we can directly tell the user how the package author intended for it to be installed.

Open questions: What about multiple stack files?

@sjakobi
Copy link
Member

sjakobi commented Jul 16, 2016

Slightly related: #2371 was opened under the assumption that stack should use the flag settings in the stack.yaml included in an sdist tarball.

@joeyh
Copy link

joeyh commented Jul 19, 2016

Due to stack install pkg ignoring the stack.yaml shipped with pkg, I have to tell my users not to use stack install pkg, and instead get the source themselves and stack install it. This is despite the pkg in question being in stackage.

@mgsloan mgsloan modified the milestones: P2: Should, P3: Optional Jul 19, 2016
@mgsloan
Copy link
Contributor Author

mgsloan commented Jul 19, 2016

@joeyh Good to know, bumping priority to P2.

I'm thinking that the resolution to this would look something like:

  1. Warn the user when they are stack install-ing an executable that came with a stack.yaml. Tell them about the --use-sdist-stack-yaml flag.

  2. Add a --use-sdist-stack-yaml flag. You're only allowed to specify hackage targets, and they all must have their own stack.yaml.

Would that be sufficient?

@joeyh
Copy link

joeyh commented Jul 19, 2016

Michael Sloan wrote:

@joeyh Good to know, bumping priority to P2.

I'm thinking that the resolution to this would look something like:

  1. Warn the user when they are stack install-ing an executable that came with a
    stack.yaml. Tell them about the --use-sdist-stack-yaml flag.

  2. Add a --use-sdist-stack-yaml flag. You're only allowed to specify hackage
    targets, and they all must have their own stack.yaml.

Seems reasonable.

see shy jo

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

4 participants