andersfugmann/amqp-client

Async v0.10.0 compatibility

Leonidas-from-XIV opened this issue · 2 comments

From what I see, v0.10.0 removed Async.Std completely, so building the code breaks now. Unfortunately I don't know whether Jane Street has any replacement for this, since the async_kernel CHANGES.md document was not updated in a long time.

The OPAM repository already updated amqp-client to conflict with >= v0.10 but I think we need an upstream solution. As I see it there are two possibilities:

  1. Switch to depending on >= v0.9 and remove Async.Std entirely.
  2. Add a wrapper module that will open Async or Async.Std depending on whether it is built with Async v0.9 or below. This could maybe be determined with cppo at build time, though I am not sure whether it is powerful enough to do so.

I don't think the additional complexity is really worth it so I'd suggest removing the Compat module and hard-depending on newer versions of Async.

The fact that Async.Std disappeared in the latest release is a mistake on my part, it should have just been deprecated for the moment and removed for the next release.
Apologies.

There is no replacement, you should open Async.Std before v0.10 and open Async after :(

As there are other breaking changes between v0.9 and v0.10 (Tcp.Where_to_connect module added, and In_channel.really_read now correctly accepts bytes and not string to name a few), I will release a new version incompatible with core/async <= v0.9.

@Leonidas-from-XIV While waiting for opam to pick it up, you can pin the dev repo. I have pushed the changes.