fierce-france-72742
01/28/2021, 10:03 AMpackage on a target, calling run on it for the first time leads to a long contraints resolution step. I quite don't understand why those constraints are resolved after the ".pex" file was created. Isn't that pex file fully self-contained and hermetic?hundreds-father-404
01/28/2021, 5:33 PMrun and package don't use the same requirements resolves
Both run and test will resolve your entire constraints.txt and use the whole thing, which means that you should not need to resolve more than once for your repo
Meanwhile, package will resolve the true subset so that the final binary only has what is actually needed, e.g. to keep the bundle size smaller
See ./pants help-advanced python-setup and resolve_all_constraints
--
This is the first ticket on the newly released public roadmap, to improve this situation https://github.com/pantsbuild/pants/issues/11105
Once that's finished, we'll get the best of both worlds. You'll only need to resolve constraints.txt once, but everything will be using the true proper subset of dependenciesfierce-france-72742
01/28/2021, 5:47 PM