haskell / haskell/cabal

Redesign `cabal {upload,haddock,check,sdist}` to provide a better Cabal/Hackage UX

Open
#3,837 4 comments 5 reactions 0 assignees View on GitHub
cabal-install: cmd/check cabal-install: cmd/haddock cabal-install: cmd/sdist cabal-install: cmd/upload type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

This ticket is here to remind me to write down a new workflow design involving the commands
- `cabal sdist`
- `cabal check`
- `cabal haddock`
- `cabal upload`

and their interactions to make it more convenient for users, as well as improve quality of Hackage uploads a bit.

The basic gist is that `cabal upload` shall provide a convenient way to perform (more or less) the following sequence of commands (and `sdist`/`check`/`haddock` should be augmented consistently):
- `cabal sdist`
- unpack the just generated tarball $SRCTAR in a temp folder, and `chdir(2)` to it
- `echo 'packages: .' > cabal.project`
- `cabal new-build`
- `cabal new-test`
- `cabal new-benchmark`
- `cabal new-haddock --for-hackage`
- `cabal upload $OLDPWD/dist/$SRCTAR`
- `cabal upload -d dist/$DOCTAR`

This all without sacrificing control over the individual phases if the user needs it.

/cc @glguy who suggested something like this to me

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.