I got an issue report recently that my package's HSpec file was missing from the hackage tarfile, which seemed rather odd to me.
I checked it out though, and the user was right:
% curl -O http://hackage.haskell.org/packages/archive/ReadArgs/1.2/ReadArgs-1.2.tar.gz
% tar tzf ReadArgs-1.2.tar.gz
ReadArgs-1.2/
ReadArgs-1.2/LICENSE
ReadArgs-1.2/ReadArgs.cabal
ReadArgs-1.2/ReadArgs.hs
ReadArgs-1.2/ReadArgsEx.hs
ReadArgs-1.2/Setup.hs
However, running through all the commits in my git repos, it seems like cabal sdist
would always include ReadArgsSpec.hs
in the package.
% cabal configure
Resolving dependencies...
Configuring ReadArgs-1.2...
% cabal sdist
Building source dist for ReadArgs-1.2...
Preprocessing library ReadArgs-1.2...
Preprocessing executable 'ReadArgsEx' for ReadArgs-1.2...
Source tarball created: dist/ReadArgs-1.2.tar.gz
% tar tzf dist/ReadArgs-1.2.tar.gz
ReadArgs-1.2/
ReadArgs-1.2/LICENSE
ReadArgs-1.2/ReadArgs.cabal
ReadArgs-1.2/ReadArgs.hs
ReadArgs-1.2/ReadArgsEx.hs
ReadArgs-1.2/ReadArgsSpec.hs
ReadArgs-1.2/Setup.hs
So now, I can think of three possibilities:
- I generated the tarfile I uploaded to hackage using something other than
cabal sdist
, and that process left outReadArgsSpec.hs
. - I altered my
ReadArgs.cabal
file before I rancabal sdist
in such a way as to excludeReadArgsSpec.hs
but failed to commit my change. - Hackage removed
ReadArgsSpec.hs
from the package file.
I view (1) and (2) as possible, but unlikely, especially since the earlier two versions of my package seem to have the same issue, and I can't think that I'd performed the same odd behavior each time.
Which leaves me with (3), which only seems likely in contrast. Is Hackage removing ReadArgsSpec.hs
from my uploaded tarfile? If so, how should I alter my ReadArgs.cabal
file to make sure it is included?