-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use @preferred_cli_env #96
Conversation
Thanks @josevalim! ❤️ 💚 💜 💛 💙 @parroty LGTM whenever you have a chance to cut a new release. |
Thanks, I wasn't aware of the feature, and will be updating the release ❤️. |
Hi @josevalim. 1. Test dependencyIf I try to remove the definition from excoveralls' It seems modified $ mix coveralls
** (CompileError) test/circle_test.exs:3: module Mock is not loaded and could not be found
(stdlib) erl_eval.erl:670: :erl_eval.do_apply/6
(elixir) lib/code.ex:370: Code.require_file/2
(elixir) lib/kernel/parallel_require.ex:57: anonymous fn/2 in Kernel.ParallelRequire.spawn_requires/5
2. Loading mix tasks from test dependencyI' trying to load updated library from other project like the following, but fails to identify mix tasks. It's defined as
Current environment is
|
It was not a bad practice, it was the only way to do until more recent Elixir versions. :) I will investigate what is happening. |
Ok, this has actually been a misunderstanding from my side. So I would recommend reverting my changes and adding the previous recommendations back to the README. I will update Elixir documentation to make this clearer. Sorry for the confusion! :( |
Thanks for checking! I'll update the README. |
Elixir provides the ability to use @preferred_cli_env directly on the task since version v1.3.0. This PR declares those attributes by default.
Keep in mind that:
This won't work for Elixir versions earlier than v1.3.0. If you still support them, you may want to add the line about preferred_cli_env back to the README
The README will be outdated as soon as this is merged, so you may want to consider a new release
Thank you! ❤️