You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Warnings from git dependency's mix.exs issued on every mix task execution #13132
Hi! This is not a big issue, but it's a small annoyance that I noticed when trying out the 1.16.0-rc.0
When a git dependency has code in its mix.exs file which causes warnings, these warnings are printed not only when this dependency is compiled, but also every next time any mix task is executed.
mix deps.get
mix deps.compile
mix compile
# or any other task:
mix help
mix test
# result in these warnings being printed again and again:
warning: parentheses are required for function calls with no arguments, got: Mix.env
│
8 │ build_embedded: Mix.env == :prod,
│ ~
│
└─ /var/home/michal/ubu/hmmm/deps/plug_forwarded_peer/mix.exs:8:26: PlugForwardedPeer.Mixfile.project/0
warning: parentheses are required for function calls with no arguments, got: Mix.env
│
9 │ start_permanent: Mix.env == :prod,
│ ~
│
└─ /var/home/michal/ubu/hmmm/deps/plug_forwarded_peer/mix.exs:9:27: PlugForwardedPeer.Mixfile.project/0
Expected behavior
The warnings coming from a dependency are only printed when this dependency is being compiled
There isn't much we can do here. The mix.exs for git dependencies is loaded every time you boot and therefore any warning will be emitted. We could silence warnings by capturing all IO but, given it can have side-effects, I would like to postpone taking such actions for now. What I will do is to postpone this particular warning itself, so there is more time to migrate.
There isn't much we can do here. The mix.exs for git dependencies is loaded every time you boot and therefore any warning will be emitted. We could silence warnings by capturing all IO but, given it can have side-effects, I would like to postpone taking such actions for now.
Understandable, thank you for the explanation!
What I will do is to postpone this particular warning itself, so there is more time to migrate.
For me it's not a big problem so I would be also fine with having to update the dependency or forking it
Activity
josevalim commentedon Nov 22, 2023
There isn't much we can do here. The mix.exs for git dependencies is loaded every time you boot and therefore any warning will be emitted. We could silence warnings by capturing all IO but, given it can have side-effects, I would like to postpone taking such actions for now. What I will do is to postpone this particular warning itself, so there is more time to migrate.
michallepicki commentedon Nov 22, 2023
Understandable, thank you for the explanation!
For me it's not a big problem so I would be also fine with having to update the dependency or forking it