-
Notifications
You must be signed in to change notification settings - Fork 697
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
cabal install haskell-src-exts-1.10.1
indeterministically fails to regenerate the happy parser
#2311
Comments
Well done tracking it down to the tarball timestamps. |
Using the timestamps when unpacking seems like a sensible thing to do. The issue with ghc-7.8 and older happy should be dealt with separately as a special case. |
This changes `moreRecentFile a b` to return true not only when `a` is younger than `b`, but also when `a` is exactly the same age of `b`, as that case is subject to race-conditions, and it's better to err on assuming it needs to be regenerated. This is an attempt to provide a pragmatic workaround for haskell#2311
Related: #130. |
This adds `notLessRecentFile a b` to return true not only when `a` is younger than `b`, but also when `a` is exactly the same age of `b`, as that case is subject to race-conditions (if the system time granularity is too low), and it's better to err on assuming it needs to be regenerated. This is an attempt to provide a pragmatic workaround for haskell#2311
I'm somewhat bitten by this as well: my package contains an in-tree autotooled library. A package So, as long as |
After investigation of the build failures on Hackage, caused by autools 'maintainer mode' kicking in and required packages not being installed on the build systems, it turns out `cabal unpack` doesn't honor timestamps of files contained in `sdist` tarballs while unpacking. This in turn causes some source files in `cbits` to appear newer than their generated versions (e.g. `configure.ac` being newer than `configure`), and the 'maintainer mode' rules being triggered, which we obviously don't want to happen in release packages. This patch changes `Setup.hs` to explicitly pass `--disable-maintainer-mode` to `configure` in builds of packages whose version number doesn't match the development version, 999. This is a work-around for Cabal issue #2311. See: haskell/cabal#2311
Release 0.0.1.0 with changes to `Setup.hs` to pass `--disable-maintainer-mode` to `configure` in release builds After investigation of the build failures on Hackage, caused by autools 'maintainer mode' kicking in and required packages not being installed on the build systems, it turns out `cabal unpack` doesn't honor timestamps of files contained in `sdist` tarballs while unpacking. This in turn causes some source files in `cbits` to appear newer than their generated versions (e.g. `configure.ac` being newer than `configure`), and the 'maintainer mode' rules being triggered, which we obviously don't want to happen in release packages. This patch changes `Setup.hs` to explicitly pass `--disable-maintainer-mode` to `configure` in builds of packages whose version number doesn't match the development version, 999. This is a work-around for Cabal issue #2311. See: haskell/cabal#2311 See: 4eeceb8 * tag 'reedsolomon-0.0.1.2': Release: Add generated autotools files Release: Set version number
Release 0.0.1.1 with disabled maintainer mode during `cbits` build After investigation of the build failures on Hackage, caused by autools 'maintainer mode' kicking in and required packages not being installed on the build systems, it turns out `cabal unpack` doesn't honor timestamps of files contained in `sdist` tarballs while unpacking. This in turn causes some source files in `cbits` to appear newer than their generated versions (e.g. `configure.ac` being newer than `configure`), and the 'maintainer mode' rules being triggered, which we obviously don't want to happen in release packages. This patch changes `Setup.hs` to explicitly pass `--disable-maintainer-mode` to `configure` in builds of packages whose version number doesn't match the development version, 999. This is a work-around for Cabal issue #2311. See: haskell/cabal#2311 See: 4eeceb8 * tag 'reedsolomon-0.0.1.2': Release: Add generated autotools files Release: Set version number
Fwiw, since |
After some more investigation, it turns out that some time ago haskell/tar@761bbc4 landed, so starting with As to whether this issue is fixed: depends on the versions of |
Can we require |
The tar dep is bumped, but the directory dep (for cabal install) is still 1.2.2. Can that be bumped? |
Note that GHC 7.10.3 had |
i forget the rules for ghc support windows.. |
Hrm -- Or we could just wait a year, and then bump the dep with no work at all :-P |
I noticed this because with GHC 7.8.4
cabal install haskell-src-exts-1.10.1
would sometimes succeed and sometimes fail with a compile failure inInternalParser.hs
, depending on whether it was regenerated or not (GHC 7.8.4 requires parsers created by a recent enoughhappy
)I tracked this down to the way source-tarball are extracted, which seem to ignore the timestamps recored in the tarballs, and instead extracts the file with current system time.
So here's two example runs (I looked at the timestamps before
cabal
would decide whether to preprocess any files), which result in two cases in which the two files are in a different relative temporal relationship to each other:case 1:
.hs
file older than.ly
file (.hs
file will be regenerated)case 2:
.hs
exact same age as.ly
file (.hs
file is not regenerated -> compile failure)Depending on whether case 1 or 2 occured (which depends on the operating system's clock accuracy, and interaction with process scheduling), the parser would be either regenerated or not.
There are a couple ways to workaround/fix this issue, here's just some ideas:
.ly
is always extracted before the.hs
-- doescabal sdist
enforce this ordering in the tarball?)cabal install some-package
could always consider a.ly
file to be regenerated, because of GHC 7.8.x and later requiring recent enoughhappy
to have generated the parser.hs
file's timestamp would normally away be younger than the.ly
file's./cc @feuerbach
The text was updated successfully, but these errors were encountered: