elixir-tesla / tesla

The flexible HTTP client library for Elixir, with support for middleware and multiple adapters.
MIT License
2k stars 340 forks source link

Tesla 1.9.0+ is not compatible with Elixir 1.10 #694

Closed halostatue closed 2 months ago

halostatue commented 3 months ago

Tesla advertises itself in its mix.exs as compatible with Elixir ~> 1.10, but since #540, the use of is_struct/2 has made that incorrect.

This should at least be documented by updating mix.exs and advising people in the README/documentation that older versions must use Tesla 1.8 or lower. A "correct" fix for this is somewhat nightmarish (it would involve making hot fix releases for 1.9.x, 1.10.x, and 1.11.x) and using pattern matching (%mod{} … where mod == Stream) on those and then making Tesla 1.12 or later ~> 1.11 (or later!) only.

yordis commented 3 months ago

Do you mind changing the elixir to 1.14+ and clarifying in the readme?

halostatue commented 3 months ago

I won't have time until next week to do so (I know it’s light, but today's "dependency update day", so my regular workday has gone by the wayside).