lexmag / fluxter

High-performance and reliable InfluxDB writer for Elixir

Home Page:https://hexdocs.pm/fluxter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Child_spec update for Elixir 1.5

pikeas opened this issue · comments

https://github.com/elixir-lang/elixir/blob/v1.5/CHANGELOG.md

Finally, child specifications are now provided as maps (data-structures) instead of the previous Supervisor.Spec.worker/3 and Supervisor.Spec.supervisor/3 APIs. This behaviour also aligns with how supervisors are configured in Erlang/OTP 18+. See the updated Supervisor docs for more information, as well as the new Supervisor.init/2 and Supervisor.child_spec/2 functions.

Hey @pikeas, thanks for the report. Maps as child specs are supported from Elixir 1.5, but we need to support ~> 1.2 (as you can see from mix.exs), so we can't really do this for now unless specifically checking for the Elixir version. We should probably do this once Elixir hard-deprecates non-maps as specs.

@whatyouhide actually this has nothing to do with Elixir supported versions, but with versions of OTP. And as 1.2 requires OTP 18 (which is first version of OTP that supports maps as child_specs) there is nothing to worry about.

@hauleth you're right. I thought the issue was about having Fluxter support the new child specs in Elixir, where you can use just the module name and it will fall back to child_spec/1. What's this issue about then?

I'll close this issue for now. Please feel free to reopen if there's more update. Thanks.