hexpm / hex

Package manager for the Erlang ecosystem.
https://hex.pm
961 stars 184 forks source link

Warn on unknown dependency options #1027

Closed wojtekmach closed 2 months ago

wojtekmach commented 2 months ago

Closes #1024

wojtekmach commented 2 months ago

I initally considered erroring which I think would be fine for top-level dependencies, the users would easily fix them. But I'm concerned if the warning would happen in a transitive dependency it is less easy to fix and would cause disruption. The warning can be easy to miss, however.

I also considered doign this in Elixir (in Mix.Dep.Loader). However the way the contract is set up, Mix.SCM.accepts_options(app, options) returns the options that were given to it, I don't think there's a way to automatically warn unless we change the contract.