elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Add override_for to dep options

Open TylerWitt opened this issue 10 months ago • 3 comments

override_for gives more information about when deps should explicitly be overridden or not.

If a dep no longer needs an override, a message will be written indicating so. Alternatively, if a dep needs an override when a dep is already using override_for, it will alert the dev.

With override: true set, if a user were to add a new dep that depends on the overridden app, there would be no indication of a potential issue.

TylerWitt avatar Jan 08 '25 14:01 TylerWitt

An attempt at implementing #14082

I'm not familiar enough to get override_for: to fail in the same way as a missing override would, though I'm not sure if that is desired based on the conversations in the issue.

I primarily tried to only add messaging in the do_finalize step.

Will update docs and polish the work up if it looks like the right approach!

TylerWitt avatar Jan 08 '25 14:01 TylerWitt

Thank you for the PR! :heart: To align expectations, my priorities for Elixir is:

  1. Release a new v1.18.x
  2. Wrap up the type inference branch
  3. Look at new features for v1.19

So it make take a while (e.g. weeks). The code here is also complex, so it may be the best approach for me to validate this is by actually implementing it too, so I may end-up reusing tests mostly if our implementations diverge considerably.

josevalim avatar Jan 11 '25 15:01 josevalim

No worries!

It was a nice excuse to understand the inner workings of Elixir/dependency resolution more in any case.

TylerWitt avatar Jan 13 '25 11:01 TylerWitt