commercialhaskell / commercialhaskell/stack

Improve error/warning reporting in `stack sdist` and `stack upload`

Open
#2,507 0 comments 0 reactions 0 assignees View on GitHub
component: output (UI/UX) type: enhancement
Dominant language
Haskell
Stars
4.1k
Forks
850
Avg merge
10h 37m
Merged PRs (30d)
4

Description

As discovered by @Blaisorblade in https://github.com/commercialhaskell/stack/issues/2501#issuecomment-240164466 the check reporting of stack sdist is much less informative than the analogous output from `cabal check`:

```
$ 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)
```

> 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.