haskellari / strict-containers

4 stars 7 forks source link

Allow hashable-1.4 #8

Closed sjakobi closed 1 year ago

sjakobi commented 2 years ago

…and update CI.

Closes #7.

infinity0 commented 2 years ago

Fixing the build error with GHC 9.4 will take some more time, because it likely involves having to redo the patches.

If you comment out the CI lines for 9.4, we can merge this, and I'll have a go at fixing it for 9.4 later.

phadej commented 2 years ago

FWIW, the 9.4.2 build failure looked like missing lower bound on vector-binary-instances in strict-containers. Also vector bound has to be at least vector >=0.12.3.0. And base lower bound is loose as well.

src/Data/Strict/Vector/Autogen/Mutable.hs:660:12: error:
    Not in scope: ‘G.ifoldrM'’
    Module ‘Data.Vector.Generic.Mutable’ does not export ‘ifoldrM'’.

These package metadata is not kept to the same standard as other haskellari packages, and I'd really don't like that fact. Please fix that ASAP and make appropriate Hackage revisions.

phadej commented 2 years ago

When I add the appropriate lower-bound to vector-binary-instances dependency, there isn't GHC-9.4 buildplan:

% cabal build -w ghc-9.4.1
Warning: Unknown/unsupported 'ghc' version detected (Cabal 3.6.2.0 supports
'ghc' version < 9.4): /opt/ghc/bin/ghc-9.4.1 is version 9.4.1
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: strict-containers-0.1 (user goal)
[__1] trying: vector-binary-instances-0.2.5.2 (dependency of
strict-containers)
[__2] next goal: base (dependency of strict-containers)
[__2] rejecting: base-4.17.0.0/installed-4.17.0.0 (conflict:
vector-binary-instances => base>3 && <4.17)
[__2] skipping: base-4.17.0.0 (has the same characteristics that caused the
previous version to fail: excluded by constraint '>3 && <4.17' from
'vector-binary-instances')
[__2] rejecting: base-4.16.3.0, base-4.16.2.0, base-4.16.1.0, base-4.16.0.0,
base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0, base-4.14.1.0,
base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0, base-4.11.0.0,
base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0,
base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0,
base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0,
base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1,
base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1
(constraint from non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: base, strict-containers,
vector-binary-instances)

That's known issue https://github.com/bos/vector-binary-instances/issues/25

But if we allow-newer base for vector-binary-instances-0.2.5.2 everything seems to build fine:

% cabal build -w ghc-9.4.1 --allow-newer='vector-binary-instances-0.2.5.2:base' --allow-newer=strict-containers:hashable

...
OK

@infinity0 please fix the bounds. Unfortunately we cannot add GHC-9.4.1 to the matrix as vector-binary-instances don't yet have recent enough and compatible release, but no code changes seems to be required in strict-containers itself.

I wish that packages in haskellari are kept to the high standard. If they aren't, the strict-containers could be somewhere else.

sjakobi commented 2 years ago

Thanks for pointing out the insufficient lower bounds, @phadej!

Regarding vector-binary-instances, I suspect that the lower bound should be >= 0.2.1.1, but I'll need to check this once I get back to a machine with GHC 8.0 later this week.

phadej commented 2 years ago

Regarding vector-binary-instances, I suspect that the lower bound should be >= 0.2.1.1, but I'll need to check this once I get back to a machine with GHC 8.0 later this week.

Yes. Though i'd treat 0.2.1.1 as PVP violating release (API additions in patch version), so >=0.2.2.0 would be better.

These versions are essentially the same:

% diff -ur vector-binary-instances-0.2.1.1 vector-binary-instances-0.2.2.0 
diff -ur vector-binary-instances-0.2.1.1/vector-binary-instances.cabal vector-binary-instances-0.2.2.0/vector-binary-instances.cabal
--- vector-binary-instances-0.2.1.1/vector-binary-instances.cabal   2022-10-31 10:47:50.931704366 +0200
+++ vector-binary-instances-0.2.2.0/vector-binary-instances.cabal   2022-10-31 10:47:56.643631350 +0200
@@ -1,5 +1,5 @@
 Name:                vector-binary-instances
-Version:             0.2.1.1
+Version:             0.2.2.0
 Synopsis:            Instances of Data.Binary and Data.Serialize for vector
 Description:
    Instances for Binary for the types defined in the vector package,
infinity0 commented 2 years ago

I wish that packages in haskellari are kept to the high standard. If they aren't, the strict-containers could be somewhere else.

I will have a look this week or so.

infinity0 commented 1 year ago

Merging this PR to fix the version bounds in another PR.

And base lower bound is loose as well.

vector-0.12.3.0 itself uses base (>=4.5 && <4.17). We use (>=4.5 && <5) to avoid having to do version bumps all the time. What do you think it should be?

infinity0 commented 1 year ago

unordered-containers-0.2.13.0 also uses (base < 5) so I'd rather not switch away from that. I can't remember now, but it's very likely I took most of the existing version bounds as a superset of those of all the dependencies.