Is there a way to tell pants to not print warnings...
# general
Is there a way to tell pants to not print warnings like
[WARN] Ignoring resolve_all_constraints...
? We want to put the minimal number of items in our constraints file as possible but we don't want to innundate people with these warnings.
work? I’m honestly not certain - we’ve only used it for deprecations. If it doesn’t work, we should fix that
We want to put the minimal number of items in our constraints file as possible
Warning that this means we can’t apply a huge performance optimization to use a single resolve for your tests and
. You’ll end up needing to resolve requirements a lot more than normal, which is often the most expensive step
we need speed
if we do do a full constraints.txt, i know the recommended tip is to create a venv and do a pip install 3rdparty/python/requirements.txt, we happen to have more than a few custom python_requirement_libaries defined outside of requirements.txt due to various reasons (one such reason being package maintainers don’t specify proper dependencies and we have to kludge them with a python_requirement_library — pydata packages i’m looking at you…) so given that, does pants have a native way for listing out pip compatible package versions for all python_requirement_library targets?
It does, this script will include all
targets too There is a possible issue if you have incompatible requirements - those would need to be manually resolved, unfortunately, e.g. deleting the version you don’t want. It’s possible to, say, use the global resolve for 90% of your code, and still have some other places that diverge from it. When it diverges, you’ll get this warning and you’ll do the proper resolve, rather than the global resolve One of the biggest feature requests for Q4 is to support multiple constraints files
i know for instance in pants v1 i could do:
Copy code
./pants dependencies 3rdparty/python:mock
and while the output is a little gnarly we could grep out the pip compatible package. But that doesn’t seem to work in v2
This script uses
./pants dependencies --type=3rdparty
to do the same thing. Which is a total misnomer. It really should be
./pants dependencies --3rdparty-type=requirement_string
or something like that
got it
❤️ 1