ex_gram icon indicating copy to clipboard operation
ex_gram copied to clipboard

Tesla configuration too general

Open manuel-rubio opened this issue 7 months ago • 1 comments

If I configure this:

config :tesla, adapter: {Tesla.Adapter.Finch, name: ContaBot.Finch}

It's ok because it's using ContaBot.Finch from the point of view of ExGram, BUT if I add other dependencies that are using another different Tesla adapter by default or even worse, the same Finch but with a different process... it's starting to depend on ContaBot.Finch because of the configuration.

Could we change that for:

config :ex_gram, tesla_adapter: {Tesla.Adapter.Finch, name: ContaBot.Finch}

This way it could be configured inside ExGram.Adapter.Tesla using the adapter macro and it releases the dependency for the rest of the dependencies also using Tesla.

What do you think?

manuel-rubio avatar Jul 12 '24 18:07 manuel-rubio