简体   繁体   中英

Elixir, how to modify dependency?

我需要将简单的handle_call函数“注入”我的一个依赖项,是否可以在不修改原始依赖项的情况下完成?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM