Nema Ga
Nema Ga

Reputation: 2590

Elixir, how to modify dependency?

I need to "inject" simple handle_call function to one of my dependencies, can it be done without modifying original dependency?

Upvotes: 0

Views: 135

Answers (1)

Haito
Haito

Reputation: 2069

I don't think that's possible without modifying it's source. (depends on dep though) I had such problem on hackathon once. I've just forked it's source on github, modified it and replaced the import with git one like that:

{ :foobar, git: "https://github.com/elixir-lang/foobar.git" }

It's a hack, but it works. Please give us more concrete example maybe we can do it another way.

Upvotes: 1

Related Questions