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 equivalent of cabal check? #2501

Open
Blaisorblade opened this issue Aug 16, 2016 · 6 comments
Open

stack equivalent of cabal check? #2501

Blaisorblade opened this issue Aug 16, 2016 · 6 comments

Comments

@Blaisorblade
Copy link
Collaborator

I might be missing something, but stack check fails and I can't find an equivalent syntax (stack lint fails too). This came up in #2500.

@sjakobi
Copy link
Member

sjakobi commented Aug 16, 2016

stack sdist and stack upload include executing checks defined in the Cabal library which, I assume, should be similar to what cabal check does.

If necessary, it shouldn't be difficult to make that functionality available through a separate command.

@Blaisorblade
Copy link
Collaborator Author

I haven't checked whether the code is in Cabal or cabal-install, but after the setup in #2500, both cabal check and cabal sdist have better output than stack sdist.

Specifically, stack sdist only says that LICENSE can't be found, not that it's mentioned in license-file (which was genuinely non-obvious in #2500), nor any of the extra info from cabal-install.

$ cabal check
The following warnings are likely affect your build negatively:
* The 'license-file' field refers to the file 'LICENSE' which does not exist.

Hackage would reject this package.
$ cabal sdist
Distribution quality errors:
The 'license-file' field refers to the file 'LICENSE' which does not exist.
Note: the public hackage server would reject this package.
Warning: Cannot run preprocessors. Run 'configure' command first.
Building source dist for foo-0.1.0.0...
LICENSE: copyFile: does not exist (No such file or directory)
$ stack sdist
Getting file list for /Users/pgiarrusso/AeroFS/Repos/stack-tatooine/foo/
Building sdist tarball for /Users/pgiarrusso/AeroFS/Repos/stack-tatooine/foo/
/Users/pgiarrusso/AeroFS/Repos/stack-tatooine/foo/LICENSE: getFileStatus: does not exist (No such file or directory)

@Blaisorblade
Copy link
Collaborator Author

By chance I found this old ticket on the same idea:
#285 (comment)

@sjakobi
Copy link
Member

sjakobi commented Aug 17, 2016

I have opened #2507 to track improving the stack sdist output.

By chance I found this old ticket on the same idea:
#285 (comment)

See my comment there.

@agrafix
Copy link
Contributor

agrafix commented Aug 25, 2016

An alternative would be to add a --dry-runoder --dry flag to stack upload that does everything but the actual upload?

@mgsloan
Copy link
Contributor

mgsloan commented Aug 18, 2017

There's now an error message mentioning to use "cabal check", that should be changed once this is implemented - #3355

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