Skip to content
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

Inaccurate version bound #7

Open
hvr opened this issue Feb 10, 2019 · 10 comments
Open

Inaccurate version bound #7

hvr opened this issue Feb 10, 2019 · 10 comments

Comments

@hvr
Copy link

hvr commented Feb 10, 2019

As can be seen at https://matrix.hackage.haskell.org/package/transformers-lift@1549836919 transformers-lift is not compatible with transformers >= 0.5.6 due to module name clashes.

I've already revised

accordingly.

The resulting build reports can be inspected at

https://matrix.hackage.haskell.org/package/transformers-lift@1549837448

@int-index
Copy link
Owner

int-index commented Feb 10, 2019

I checked and I can't find any module name that would clash. What is the exact build failure?

Could it be caused by the writer-cps-transformers dependency? The Control.Monad.Trans.Writer.CPS module was copied from there to the transformers package in 0.5.6.

If that's the case, I think writer-cps-transformers must be revised, not transformers-lift.

@int-index
Copy link
Owner

int-index commented Feb 10, 2019

@hvr I figured out how to read the logs, and indeed, the issue is due to writer-cps-transformers:

src/Control/Monad/Trans/Lift/Local.hs:30:18:
    Ambiguous module name `Control.Monad.Trans.Writer.CPS':
      it was found in multiple packages:
      transformers-0.5.6.2 writer-cps-transformers-0.1.1.4

Please undo your changes to my correct version bounds.

@int-index
Copy link
Owner

int-index commented Feb 10, 2019

Okay, come to think of it, if two packages expose equally named modules, maybe it is downstream's issue to deal with. I tried to adapt my code to transformers >= 0.5.6 but it does not expose .Internal modules for Control.Monad.Trans.Writer.CPS and Control.Monad.Trans.RWS.CPS, so that turned out impossible.

@hvr
Copy link
Author

hvr commented Feb 10, 2019

@int-index hrm... yeah, this one can in theory have multiple ways to be resolved.

But it's not writer-cps-transformers's "fault" that another package suddenly decided to name-clash its modules (i.e. there's no requirement whatsoever that packages have unique module names over Hackage or even just among packages that may be used together by a consumer). In this particular case I believe the best course of action is to use {-# LANGUAGE PackageImports #-} and disambiguate that you indeed want the CPS modules to be taken from writer-cps-transformers


Otoh, I just realised due to minad/writer-cps-transformers#7 that @minad seems to intend to actually turn writer-cps-transformers into a compat package (which is also a bit tricky as it needs to ensure that the API version of writer-cps-transformers accurately reflects the API exposed for transformers older and newer than 0.5.6.0 (iow, depending on writer-cps-transformers == x.y.z doesn't result in some conditional API)... or things will become extremely messy to fixup for Hackage Trustees :-) )

@minad
Copy link

minad commented Feb 11, 2019

@hvr indeed. The writer-cps-* packages will turn into compatibility packages soon.

@hvr
Copy link
Author

hvr commented Feb 11, 2019

@minad fyi, recently with the network/network-bsd split, we had a related situation which took some time to figure out and it also shows the trickiness involved (hinted at in the package description): http://hackage.haskell.org/package/network-bsd

...applied to the writer-cps-transformers case it'd require to carefully track the future transformers releases to make sure that everytime the API reexported through writer-cps-transformers might change, a new release of writer-cps-transformers with the appropriate version bump is performed.

@int-index
Copy link
Owner

The thing I can't figure out is how to deal with .Internal modules. I need them for some functionality, but transformers doesn't seem to expose an unsafe interface to the CPS modules.

@hvr
Copy link
Author

hvr commented Feb 11, 2019

@int-index if transformers doesn't expose things you need, I'm afraid you're out of luck -- unless some dirty unsafeCoerce games are played :-)

@minad
Copy link

minad commented Feb 11, 2019

Transformers should expose those modules. Can you open an issue please?

@int-index
Copy link
Owner

@minad Alright, I opened an issue there https://hub.darcs.net/ross/transformers/issue/67

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants