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

stack check - verify dist tarball #1183

Closed
wereHamster opened this issue Oct 17, 2015 · 9 comments
Closed

stack check - verify dist tarball #1183

wereHamster opened this issue Oct 17, 2015 · 9 comments

Comments

@wereHamster
Copy link

Cabal has a command check which I used to verify the tarball before uploading it to hackage. Stack doesn't have such a command, and neither sdist nor upload indicate that they would run any such checks.

@borsboom
Copy link
Contributor

Seems like that would be nice to add. Perhaps stack sdist --check and stack upload --check options? A pull request would be welcome.

@mrkkrp
Copy link
Collaborator

mrkkrp commented Nov 7, 2015

Is anyone working on this? I could try to implement it. I like the idea of stack sdist --check (print results of checking when creating a tarball), but how stack upload --check should work? Should it reject uploading if there are warnings or even worse upload package silently even if there are warnings (that's not what people would want, I guess)? Not clear.

@mgsloan
Copy link
Contributor

mgsloan commented Nov 8, 2015

@mrkkrp I don't think anyone is working on this, feel free to have at it!

I think both stack sdist --check and stack upload --check should refuse to perform their action if the check fails. In order to reject uploading when there are warnings, we can use the --pedantic flag.

[EDIT: migrated some stuff to #1350]

@mgsloan
Copy link
Contributor

mgsloan commented Nov 16, 2015

See the haddocks for Distribution.PackageDescription.Check:

This code gets uses when configuring a package when we consider only basic problems. The higher standard is uses when when preparing a source tarball and by Hackage when uploading new packages.

I'm not sure what exactly this "higher standard" entails - does it mean that any PackageCheck result in the package is rejected?

If hackage is always running these checks, then we may as well have stack upload always run them too. So, I think this shouldn't even require an extra --check flag, and perhaps that flag can instead be used for #1350.

@mrkkrp
Copy link
Collaborator

mrkkrp commented Nov 16, 2015

@mgsloan, I've tried to implement this (at least for sdist), but my questions are still not answered. Can you review what is already done in #1334 and give me a hint how to solve problems mentioned in comments? I planned to return to this when I have time (if it's still something you want to be implemented).

@mgsloan
Copy link
Contributor

mgsloan commented Nov 16, 2015

Thanks for your work on this! I was still typing up my feedback and considering your changes, I've added that now.

@mrkkrp
Copy link
Collaborator

mrkkrp commented Nov 30, 2015

@mgsloan, Can we close this now when solution is merged?

@wereHamster
Copy link
Author

What was the solution? Can you point me to a pull request?

@mgsloan
Copy link
Contributor

mgsloan commented Dec 1, 2015

Here's the PR: #1334

Yup, this can be closed!

@mgsloan mgsloan closed this as completed Dec 1, 2015
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