limited-insurance-3739304/28/2021, 7:42 PM
directory in my repository that has some Python files and other templates, but shouldn't necessarily have any BUILD files. When I run
it errors out because one of the subdirectories doesn't have a BUILD file, and there doesn't appear to be a way to tell the command to ignore any directories, or to tell it to run only against the
echoing-manchester-7012204/28/2021, 8:31 PM
echoing-manchester-7012204/28/2021, 8:31 PM
echoing-manchester-7012204/28/2021, 8:32 PM
#!/bin/sh PEX_MODULE=foo:main /usr/local/bin/foo_and_bar.pex "$@"
plain-carpet-7399404/28/2021, 9:49 PM
but I think that can't be done from within Pants, right?
user04/29/2021, 2:20 AM
helpful-lunch-9208404/29/2021, 3:14 PM
MDB_MAP_FULL: Environment mapsize limit reached"
user04/29/2021, 5:11 PM
user04/29/2021, 6:45 PM
cuddly-flag-6808504/29/2021, 8:39 PM
ENV XDG_CACHE_HOME /root/.cache
But all subsequent docker runs dont use any cached data, and the build starts from scratch. Are there any examples of pants + docker + caching that are known to work?
RUN --mount=type=cache,target=/root/.cache/ ./pants binary some/jar/to/build:
busy-vase-3920204/29/2021, 9:54 PM
plain-carpet-7399404/29/2021, 11:02 PM
, etc. I know with a macro you can create multiple targets but it doesn't look like macros let you combine goals. I can create a custom rule but (1) is that necessary and (2) if so, I think I need to do some
like calls, once for each target, but I'm not sure what the right types to
await Get(LintResult, Target, target)
are for the other goals -- how do I find those?
polite-garden-5064104/30/2021, 5:06 PM
proud-jackal-1649704/30/2021, 6:40 PM
flag in v1.30 when using a custom target
plain-carpet-7399405/01/2021, 12:37 AM
that looks like this:
from .require import require from .foo import foo __all__ = ['require', 'foo']
files exist and can be imported from other packages as expected (e.g.
). I added a unit test for
which does not use
currently doesn't have any unit tests. My BUILD file is super simple:
When I try to run the tests in
My theory is that since I'm not using
E ModuleNotFoundError: No module named 'utils.require'
in any tests that file doesn't get put in my sandbox so it's not available and I therefore get the error. But adding a
target doesn't help either. Having an
that exports a bunch of things some of which may not have unit tests seems fairly common so I suspect I'm doing something wrong. Any advice?
plain-carpet-7399405/01/2021, 12:59 AM
directory but on each build I see the
script re-downloading pants and re-installing the associated pip packages. Am I doing something wrong?
user05/01/2021, 3:54 PM
salmon-nest-580105/01/2021, 10:22 PM
, etc. I've also experimented with
(the variable being a handy reference to the bundle I generated). But regardless of what I set, I always get the following when trying to do anything other than
I thought maybe there was some sort of issue with pants not liking the openssl that homebrew has installed, and that maybe I needed to rebuild it from sources, so I attempted that - same output. I have longer logs from that if anyone wants to see (I didn't post them here as this is already too long). Regardless of what I set, if I set those variables, if I don't set them, I get the same response. I know
Exception: Error downloading file: error sending request for url (<https://github.com/pantsbuild/pex/releases/download/v2.1.35/pex>): error trying to connect: invalid certificate: BadDER
based work perfectly fine on my system - I needed those awhile ago and I sorted them out; I know for sure that the generated bundle works perfectly fine with those tools, and other things like
, etc. Any ideas? I'm just looking for a workaround that isn't getting out from behind the SSL Inspection server (I could, but then this won't work for anyone if they're ever inside the company intranet, and that's not really a solution). I can set whatever complicated environment I need. I know I could host the artifacts myself a-la proxy limitations, but I'd really rather not do that either. I really think this should work, I just can't figure out why it doesn't.
happy-kitchen-8948205/02/2021, 10:42 PM
plain-carpet-7399405/03/2021, 6:03 PM
that includes an extra like:
but Pants doesn't like that:
Aren't extras required for proper support in some cases? What's the correct way to deal with an optional extra that is required by the code if I want to be freezing dependencies?
DEPRECATION: Constraints are only allowed to take the form of a package name and a version specifier. Other forms were originally permitted as an accident of the implementation, but were undocumented. The new implementation of the resolver no longer supports these forms. A possible replacement is replacing the constraint with a requirement.. You can find discussion regarding this at <https://github.com/pypa/pip/issues/8210>. ERROR: Constraints cannot have extras
big-xylophone-4340305/03/2021, 6:20 PM
user05/03/2021, 7:21 PM
user05/03/2021, 8:07 PM
square-oxygen-7528805/04/2021, 11:10 AM
If I open IDEA's terminal and run
No valid Python interpreter found. For `pants_version = "1.30.0"`, Pants requires Python 3.6, 3.7, or 3.8 to run. Please check that a valid interpreter is installed and on your $PATH.
there, I will see:
Cause I have pyenv configured for this (scala) project So I don't get how to get Pants in IDEA up and running cause it seems like it tries to use 3.9.x and fails (and it ignored pyenv) Any ideas how to fix it? Cheers.
% python Python 3.8.6 (default, May 4 2021, 09:31:45) [GCC 10.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>>
polite-garden-5064105/04/2021, 2:27 PM
) we do it in pants: https://github.com/pantsbuild/pants/pull/11860 and this is also possible in other CI systems, for example circle ci: https://circleci.com/docs/2.0/artifacts/ BTW - travis can't do it on its own (it only allows uploading somewhere else, like s3) so we might want to reconsider using it as an example in the docs and in the example-python repo... since I don't think anyone using pants 2.x will be using travis.... (I would be surprised....) so a GH actions/CircleCI makes more sense. since those are the more common ones people are familiar with (and are not slowly dying).
user05/04/2021, 5:54 PM
plain-sundown-2553705/04/2021, 7:13 PM
and start with it
proud-dentist-2284405/04/2021, 7:49 PM