-
Notifications
You must be signed in to change notification settings - Fork 847
Description
Currently, in order to test that all the necessary files are in a source distribution tarball, you need to manually try building it. This feature has precedent in cabal-src and possibly elsewhere.
I'm thinking something like stack sdist --test
to both generate and test the tarballs. It'd also be nice to have stack upload --test
, which would test the tarballs, and upload if they pass.
The first step is to extract the tarballs into a directory, and the next step is to build + test the code with the current project's stack.yaml configuration.
I'm not sure what the ideal implementation of this would look like. One possibility would be to have the extraction directory mimic the structure of the mega-repo, and then copy the stack.yaml into it. This would be rather costly in rebuild time and disk space, though.
For my own testing, I've just modified my stack.yaml
to instead point at the extracted directories. This suggests an implementation approach where test
is run, but with portions of the packages list substituted. This approach's downside is that it stomps on your old local install root. I don't see this as a very large downside.