This is not the first time this has happened: see #14678 (closed). While we were able to catch #14678 (closed) before a major release was shipped, but unfortunately, that didn't happen this time.
Trac metadata
Trac field
Value
Version
8.6.3
Type
Bug
TypeOfFailure
OtherFailure
Priority
highest
Resolution
Unresolved
Component
libraries (other)
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
angerman, bgamari
Operating system
Architecture
Edited
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items
0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items
0
Link issues together to show that they're related or that one is blocking others.
Learn more.
Ryan Scottchanged title from GHC 8.6's bundled version of transformers doesn't correspond to a Hackage release to GHC 8.6 bundles libraries that don't correspond to Hackage releases
changed title from GHC 8.6's bundled version of transformers doesn't correspond to a Hackage release to GHC 8.6 bundles libraries that don't correspond to Hackage releases
We should be careful about transformers, since there are actually API-relevant code changes that were introduced in commit ghc/packages/transformers@80557845. In particular, I'm pretty sure that contravariant-1.5 requires these changes to compile (at least, angerman reported an error when he tried to build contravariant-1.5 with the Hackage version of transformers-0.5.5.0).
So I've come up with a plan which I think should work. I'll try to whip it up today and see how it performs. I'll need the produces artifacts anyway to get this resolved.
For each of the (external) libraries, we'll run cabal new-sdist (1)
Then we'll pull the same one from hackage with cabal get --pristine. (2)
And finally run a diff over the unpacked one from (1) and (2).
This should yield an empty set.
I'll try using this approach to generate me the sufficient patches for the
packages that are in ghc and for which hackage has different source.
The verify-packages.sh will generate the cabal sdists, pull the corresponding package from hackage, and diff them. Giving you the output above in the end. Ideally they should all be 0B in size.
For each of the (external) libraries, we'll run cabal new-sdist (1)
Then we'll pull the same one from hackage with cabal get --pristine. (2)
And finally run a diff over the unpacked one from (1) and (2).
This should yield an empty set.
Fwiw, we can't guarantee this in general, nor do we need to.
There is no requirement that you can actually reinstall a boot package release bundled with GHC. There's no need for that, and there's packages that inevitably fall into this category. So tooling needs to be able to cope with that anyway; and in fact Cabal does.
That being said, the only invariant that actually matters and the only one I care about very strongly is that of **consistent API versioning**:
*If a package foo-1.2.3 is bundled with GHC then if-and-only-if there is a valid build-plan (meeting all involved version constraints), then the foo-1.2.3 from Hackage re-synthesized via Cabal must not to be distinguishable at the API level from the GHC pkg-db pre-installed one. In other words, foo-1.2.3 shall uniquely determine the observable API exposed of that package.**
A very prominent example was the mtl package that shipped with GHC 8.4.1 which broke the API versioning and caused real-world problems which (see https://github.com/haskell-hvr/HsYAML/issues/1 which required some very awkward CPP -- but in general this kind of problem is not always workaroundable by CPP! We must be able to trust the API versioning or we'd have to give up on version numbers altogether)
Anything else, like diverging testsuites/benchmark components or other deltas which have no effect on the exposed API are of very little concern to me.
Avoiding divergences would require enough time between the final release and the preceding release of a GHC last-beta or release-candidate after which boot package maintainers can be encouraged to publish their package release candidates on Hackage to the primary index (and I have to stress: "and no sooner!", as it's strongly discouraged to make releases on Hackage which target or advertise support for unreleased dependencies or tooling, or causing avoidable uploads to Hackage as is clearly specified in the Hackage upload guidelines), after we have ensured (in topological dep ordering) that the package candidates are sound and in sync with the artifacts included in the GHC release, and also fix any minor and not so minor issues detected in the process.
or spelled out differently, the protocol for finalising boot libraries would be more or less like
release a last-beta/release-candidate
go over all boot libraries in topological sorted order and ensure their exposed API matched the Hackage release candidate; ensure that the compatibility advertised via version constraints is accurate; if needed, coordinate fixups with the maintainer
restart 2. in case there's not-so-minor changes which might cause an avalanche effect on their rev-deps
if there were fixups needed, make sure to ./validate again;
when it's clear that the release-candidate has no more issues (otherwise go back to 1.) and we're going to cut the final release; encourage package maintainers to publish their latest Hackage package release candidate (which we verified to match the one contained in GHC's release) to the main index (i.e. press that "publish" button in the Hackage release candidate UI)
It would be great to get 8.6.4 out, if only to fix this bug, which is a real productivity killer as I seem to need to empty my .ghc and .cabal directories and reinstall the libraries needed for whatever my project using to get going. Unless someone knows of a better workaround.
Resolving dependencies...cabal: Could not resolve dependencies:[__0] trying: directory-1.3.3.2 (user goal)[__1] next goal: ghc (user goal)[__1] rejecting: ghc-8.6.3/installed-8.6... (conflict: directory==1.3.3.2, ghc=> directory==1.3.3.0/installed-1.3...)[__1] rejecting: ghc-8.6.1, ghc-8.4.3, ghc-8.4.1, ghc-8.2.2, ghc-8.2.1(constraint from user target requires ==8.6.3)[__1] fail (backjumping, conflict set: directory, ghc)After searching the rest of the dependency tree exhaustively, these were thegoals I've had most trouble fulfilling: directory, ghc