hundreds-father-404
05/05/2022, 8:58 PM[python-infer].unowned_dependency_behavior = "error"ModuleNotFoundErrrorhundreds-father-404
05/05/2022, 8:58 PM# pants: no-infer-deppython_requirement./pants filter --target-type=python_requirement ::python_requirementrequirements.txtpython_requirementspoetry_requirementspipenv_requirementsrequirements.txtansicolorscolorsmodulesmodule_mappingpython_sources./pants list path/to/file.py./pants tailorsrc/py/my_project/app.py<http://my_project.app|my_project.app>hundreds-father-404
05/05/2022, 8:59 PMhundreds-father-404
05/05/2022, 9:00 PMresolve=parametrizehundreds-father-404
05/05/2022, 9:01 PMwitty-crayon-22786
05/05/2022, 9:29 PMI’m thinking of how we can improve the multiple resolves situation, like if we can dynamically detect if there is that import but inside another resolvewe should i think… it’s really cheap to do.
hundreds-father-404
05/05/2022, 9:30 PMwitty-crayon-22786
05/05/2022, 9:30 PMhundreds-father-404
05/05/2022, 9:31 PMwitty-crayon-22786
05/05/2022, 9:33 PMWould you agree that if the module is another resolve, that is realistically the only likely cause of the failure?about a 95% chance, yea? there are overlap cases where it might be that you meant to use some sources instead of thirdparty, for example… but yea.
witty-crayon-22786
05/05/2022, 9:34 PMhundreds-father-404
05/05/2022, 9:34 PMwitty-crayon-22786
05/05/2022, 9:35 PMhundreds-father-404
05/05/2022, 9:36 PMgiven that, is https://github.com/pantsbuild/pants/pull/15334 ready, or should we wait?Totally depends how we want to approach the intersection of
unowned_dependency_behaviorhundreds-father-404
05/05/2022, 9:36 PMunowned_dependency_behaviorwitty-crayon-22786
05/05/2022, 9:36 PMunowned_dependency_behaviorhundreds-father-404
05/05/2022, 9:37 PMunowned_dependency_behaviorhundreds-father-404
05/05/2022, 9:37 PMwhere are we on enabling unowned_dependency_behavior by default? i think that we should consider it.Extremely strong +1 from me. I think this is such a better experience than a ModuleError @bitter-ability-32190 over DM was +1, but not sure between error vs warn
witty-crayon-22786
05/05/2022, 9:37 PMwitty-crayon-22786
05/05/2022, 9:38 PMhundreds-father-404
05/05/2022, 9:38 PMi don’t know about coupling it per-seThe error message about multiple resolves has to come somewhere. What I'm suggested is it be included in the error message from
unownded_dependency_behaviorwitty-crayon-22786
05/05/2022, 9:39 PMhundreds-father-404
05/05/2022, 9:39 PMIMO, until we have a way to render all of the errors, we shouldn’t make it an error by default. too much of a pain for new users.I wonder how we could pull that off. I think we'd need to make the dependency inference plugin hook have a fallible component where you can insert *lazy error messages?
witty-crayon-22786
05/05/2022, 9:40 PMI wonder how we could pull that off.i’ve had some ideas recently (related to collecting atomic sideeffects via EngineAwareReturnType, and then committing them at the end of the run). but i don’t think that it needs to be tackled here.
hundreds-father-404
05/05/2022, 9:40 PMbitter-ability-32190
05/05/2022, 9:42 PMbitter-ability-32190
05/05/2022, 9:43 PMhundreds-father-404
05/05/2022, 9:43 PMwitty-crayon-22786
05/05/2022, 9:44 PMAgreed the repetitively iterative nature of the errors though is roughyea: that’s why not errors until we solve that problem. mentioned above (and elaborated since) that i’ve had some thoughts on it
hundreds-father-404
05/05/2022, 9:44 PMAgreed the repetitively iterative nature of the errors though is roughOn the other hand, what if you get 100 errors but fixing 1 would fix 90 of them. You give up because 100 is overwhelming?
hundreds-father-404
05/05/2022, 9:47 PMbitter-ability-32190
05/05/2022, 10:01 PMwitty-crayon-22786
05/05/2022, 10:08 PMwitty-crayon-22786
05/05/2022, 10:10 PMwitty-crayon-22786
05/09/2022, 8:20 PMi’ve had some ideas recently (related to collecting atomic sideeffects via EngineAwareReturnType, and then committing them at the end of the run).elaborated here: https://github.com/pantsbuild/pants/issues/15350#issuecomment-1121536968
