haskell / mtl

The Monad Transformer Library
http://www.haskell.org/haskellwiki/Monad_Transformers
Other
360 stars 63 forks source link

`mtl-2.3` dropped `ExceptT` #117

Closed andreasabel closed 2 years ago

andreasabel commented 2 years ago

Apparently, mtl-2.3 dropped ExceptT, see e.g.:

This is a bit surprising, as e.g. it has ReaderT and more of that kind: WriterT, RWST, IdentityT ...

Note that this drop is inconsistent with the documentation of mtl-2.3. E.g. the following example now produces a scope error:

The changelog also does not mention this:

So maybe ExceptT was dropped on error?

(Let me add that I am surprised that this release came without a RC...)

Bodigrim commented 2 years ago

ExceptT was dropped in bfddbe8c7c21bdd3d54e8f4d6df55d511356a101 (merged in #108) with the commit message "Remove some re-exports, raise minimum GHC to 8.6, remove unneeded CPP". While ExceptT is a re-export from transformers indeed, every other entity from transformers such as ReaderT, WriterT, etc., has survived, and AFAIR only re-exports from base such as Control.Monad were planned for removal.

kozross commented 2 years ago

@Bodigrim and @andreasabel - you are absolutely right, this was a mistake on my part. I will send a PR today remedying this. Sorry that I missed it.

andreasabel commented 2 years ago

I observe that mtl does not have a testsuite. Having tests could prevent such mistakes. For a start, examples from the documentation (such as the one I refer to above) could be added to the testsuite.

Historic note: The release of mtl-2.1 was botched, read at https://github.com/agda/agda/commit/8ce5eb07d11ee319fd8122d436f7a56e6dec3092 (typos included), and this blunder could have been prevented by the simplest test suite trying out the State monad. @ekmett compensated me for may 1.5 day bug hunt in Agda with a beer, but apparently, did not see the necessity to add a test suite...

ekmett commented 2 years ago

It seems another beer is at least long overdue. Test suites are on @kosross, however. ;)

Bodigrim commented 2 years ago

@kozross FWIW I beg you not to rush: take your time before the next release, upload a package candidate first, gather user's feedback. There is no urgency to resolve this issue today.

andreasabel commented 2 years ago

I agree with @Bodigrim. There is no urgency now, as the problem in mtl-2.3 can be worked around by importing from Control.Monad.Trans.Except.

If you want, @kozross, you can deprecate mtl-2.3 on hackage: https://hackage.haskell.org/package/mtl/preferred/edit (I just deprecated 2.1 there now --- it hadn't been deprecated...)

kozross commented 2 years ago

@andreasabel and @Bodigrim - I agree, rushing isn't a good idea. However, at least in the repo, we should fix this as soon as is reasonable. I feel pretty responsible here, and the fix isn't hard.

As for tests: yes, I agree 100%. I will probably add some; in truth, this is a niche I'm fairly familiar with, so if anyone is suited to do this, it's me.

sjakobi commented 2 years ago

@kozross, @emilypi Could you possibly follow up on the announcements for mtl-2.3 and say that there will be another release that restores the presence of ExceptT?

Abastro commented 2 years ago

Ouch, got bitten by this. Mistakes could even sneak into mtl I guess. Is there no way to mark beta release in PVP?

andreasabel commented 2 years ago

Is there no way to mark beta release in PVP?

No. (Maybe there used to be something.) The tool to test releases are release candidates. See, e.g., https://discourse.haskell.org/t/ann-release-candidate-for-mtl-2-3/3687 and https://github.com/haskell/mtl/issues/86#issuecomment-1024303926.

Abastro commented 2 years ago

Yea, wondering if this could be avoided in the future by using some kind of beta branch, sounds like it would be hard.

andreasabel commented 2 years ago

Concerning tests: just released tasty-1.4.2.3 does not depend on mtl anymore, so it can be used for a testsuite. (Thanks to @Bodigrim.)

sjakobi commented 2 years ago

What's the timeline for a release containing the fix (#121)?

The current situation is blocking the migration to mtl-2.3 because it's unclear whether packages that fail to build (in part) due to this issue should wait for a fixed release or not. https://github.com/haskell-tls/hs-certificate/issues/129 is an example.

EDIT: texmath also fails to build due to this issue.

emilypi commented 2 years ago

@kozross and I will review and get something out by EOW. There are a few fiddly bits that need sorting out with the docs.

andreasabel commented 2 years ago

If you want, @kozross, you can deprecate mtl-2.3 on hackage

I am worried about the spread of the wildfire, and took action here in my role as Hackage Trustee. I deprecated 2.3. https://hackage.haskell.org/package/mtl/preferred

You can undo this at any time, and please do so if you see adversary effects of the deprecation of 2.3.