ekmett / bifunctors

Haskell 98 bifunctors, bifoldables and bitraversables
Other
57 stars 42 forks source link

Bump major version, warn about `bifunctor-classes-compat` migration in CHANGELOG #115

Closed RyanGlScott closed 1 year ago

RyanGlScott commented 1 year ago

Addresses #114.

phadej commented 1 year ago

The problem happens e.g. in https://github.com/haskellari/these/actions/runs/4408803121/jobs/7724289572 (not sure how long the logs will stay on).

As strict depends on bifunctors, and tries to define Assoc which has bifunctor-classes-compat.Bifunctor as a superclass in newer assoc, things go wrong if I'd just relax bounds in strict (as I do in the job with allow-newer).

So there is a concrete example of why bumping major version when moving from bifunctors to bifunctors-classes-compat as a compat package is very much justified.

That's unfortunate cascade of major bumps, but at least they all hit at once.


I'll proceed with major releases of these and semialign, and probably strict as well. (I'll do these tomorrow, I want to double check I don't miss anything).

RyanGlScott commented 1 year ago

Good to know. Indeed, this was a perfect storm of several things being migrated, and I don't know how to do better other than signalling users to look carefully via major version bumps. Thanks for taking care of these!

phadej commented 1 year ago

Another issue I found is that old lens may depend on newer bifunctors, and it defines type-classes like Bifunctor f => Swapped f with wrong Bifunctor as super-class.

semigroupoids defined Biapply, but it got major revision, so it works.

Maybe bifunctors-5.6 should been bifunctors-6, but maybe it's only few lens versions which can be revised. My quick search doesn't find anything else https://hackage-search.serokell.io/?q=class.*Bifunctor.*%3D%3E - there is semigroupods, lens, semialign, assoc I'd expect to see, and nothing more "positive"

RyanGlScott commented 1 year ago

Ah, I see. Do you know what is the most recent lens version that is affected by this?

phadej commented 1 year ago

Ah, I see. Do you know what is the most recent lens version that is affected by this?

lens-5 started using assoc for Swap instead of Swapped.

RyanGlScott commented 1 year ago

OK, so lens-5 and up, then? What in particular needs to be revised? The assoc upper version bounds? The bifunctors upper version bounds? Something else?

phadej commented 1 year ago

Wait. The revision won't help, as lens is consistent and failing build plan is using bifunctors-5.5.15.

I have to figure out my own code defining Swapped instances for types I define only bifunctor-classes-compat.Bifunctor instance.

EDIT: Maybe I'll just require lens-5 and call it a day. EDIT: And lens-4 users have to be careful.