jechol / definject Goto Github PK
View Code? Open in Web Editor NEWUnobtrusive Dependency Injector for Elixir
License: Other
Unobtrusive Dependency Injector for Elixir
License: Other
When you change the code like below and run your test, CompileError
happens at "no do" case.
(or just run $ env MIX_ENV=dev mix test
)
And it means that error will happen on other environments except 'test'.
# definject.ex:70
defp do_definject(head, body_and_resq, %Macro.Env{} = env) do
alias Definject.Inject
original =
quote do
def unquote(head), unquote(body_and_resq)
end
# if Application.get_env(:definject, :enable, Mix.env() == :test) do
# Inject.inject_function(head, body_and_resq, env)
# |> trace(original, env)
# else
original
# end
end
== Compilation error in file test/use_cases/no_do_test.exs ==
** (CompileError) test/use_cases/no_do_test.exs:6: missing :do option in "def"
test/use_cases/no_do_test.exs:6: (module)
test/use_cases/no_do_test.exs:5: (module)
(stdlib 3.13) erl_eval.erl:680: :erl_eval.do_apply/6
(elixir 1.10.4) lib/kernel/parallel_compiler.ex:396: Kernel.ParallelCompiler.require_file/2
(elixir 1.10.4) lib/kernel/parallel_compiler.ex:306: anonymous fn/4 in Kernel.ParallelCompiler.spawn_workers/7
mix test
spits compile warnings.
warning: extra parentheses on a remote function capture &DefinjectTest.Foo.quack()/0 have been deprecated. Please remove the parentheses: &DefinjectTest.Foo.quack/0
test/definject_test.exs:26: DefinjectTest.Foo.bar/2
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/mix_test.yml
actions/checkout v2
erlef/setup-beam v1
actions/checkout v2
erlef/setup-beam v1
ubuntu 20.04
ubuntu 20.04
mix.exs
ex_doc ~> 0.23.0
Please install our new product, Sonatype Lift with advanced features
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.