The errors that di currently emits are terrible. The main reason for this is that solving and execution flatten the execution graph (by topologically sorting it). So when you get an error you have no idea what called what.
I propose that during solving we keep track of the "path" to each dependency so that we can pretty format it into error messages (using rich?) and also include it in the error object for programatic access.
During solving if there is a scope conflict, unwireable dependency, etc.
We can pass the "path" to each dependency into the Task object. It will catch any exceptions from calling the dependency and do a raise from including this info.
The errors that di currently emits are terrible. The main reason for this is that solving and execution flatten the execution graph (by topologically sorting it). So when you get an error you have no idea what called what.
I propose that during solving we keep track of the "path" to each dependency so that we can pretty format it into error messages (using rich?) and also include it in the error object for programatic access.
raise from
including this info.