Promesa should not provide print-method impl for CompletionStage
Promesa provides an implementation of clojure.core/print-method for java.util.concurrent.CompletionStage. This can lead to surprising ambiguity errors in application code (see e.g. https://github.com/clj-commons/manifold/pull/237) which then must be worked around via prefer-method. Since neither the type nor the multimethod are owned by Promesa, the error doesn't give any indication as to where this ambiguity stems from which makes it tricky to track down.
Additional rationale: Since print-method only dispatches on the type of the first argument, the Guidelines for extension of protocols arguably apply here, as well. The first of these cover this particular case:
If you don’t own the protocol or the target type, you should only extend in app (not public lib) code, and expect to maybe be broken by either owner.
Adding to this, not sure if this should be a separate bug report:
Promesa's print-method for CompletionStage uses the IState protocol for (pt/-pending? x) etc. However, CompletionStage does not satisfy this protocol, CompletableFuture does. As a result, printing a CompletionStage that is not a CompletableFuture will throw exceptions.
In general, Promesa's JVM implementation assumes in some places that a promise is a CompletableFuture, e.g. p/all and p/race are implemented using CompletableFuture/allOf and CompletableFuture/anyOf, expecting CompletableFuture arguments but not CompletionStage. The protocols seem to suggest that one can provide custom types that satisfy the protocols, but this will fail in seemingly random places.
Commited for 12.x, thanks for reporting