ambitious-actor-36781
12/10/2021, 2:30 AMcurved-wall-59116
12/10/2021, 10:51 AMmypy==0.91
for type checking. When my colleague runs ./pants typecheck <projects/project>
it works pretty well.
When i run it, it will solve the constraints.txt file, and it takes 25+ mins. How come it runs so slowly on my computer?curved-television-6568
12/10/2021, 11:11 AMfresh-account-42296
12/10/2021, 3:49 PMrefined-addition-53644
12/10/2021, 4:37 PMsources
set to glob pattern like dir_name/***/**.py
. With the glob pattern the issue is that the sub-modules can be owned by two targets - one at the top level and the other one from the nested sub packages with BUILD files.billions-bear-56484
12/10/2021, 5:19 PMrefined-addition-53644
12/10/2021, 5:36 PMtailor
where we can provide list of directories which it should ignore when running ./pants tailor
?loud-laptop-17949
12/10/2021, 8:47 PMCreating test database for alias 'default'...
and a working database. When running the same tests with pants, the django testing framework does not appear to create the test database. Am I missing something obvious here?refined-addition-53644
12/13/2021, 6:01 PMresources
dependency explicitly in python_distribution
target, but it still doesn't get shipped with the source code. What is the way to achieve this?gentle-hydrogen-65984
12/14/2021, 3:28 AMlint.jvm-dep-check.unnecessary_deps
and missing_direct_deps
and seeing this:
File "/Users/mitesh/.cache/pants/setup/bootstrap-Darwin-x86_64/1.27.0_py36/lib/python3.6/site-packages/pants/backend/jvm/tasks/jvm_dependency_check.py", line 292, in _compute_unnecessary_deps
for dep_entries in actual_deps.values():
Exception message: 'list' object has no attribute 'values'
I debugged here and printed out target
and actual_deps
and it gives this. The TODO comment seems to acknowledge the bug?
JarLibrary(//:scala-library-synthetic) ['/usr/local/Cellar/openjdk@8/1.8.0+312/libexec/openjdk.jdk/Contents/Home/jre/lib/rt.jar']
best-florist-45041
12/14/2021, 7:07 AMpants
and ran into with an interesting failure case with installing a 3rd party dependency (avro-python3==1.10.0).
Short version: using ca_certs_path + indexes.add
for a company pypi repo caused installation of the setup_requires dependencies to fail. After commenting out those options in pants.toml
the installation would succeed. All other dependencies (including private ones) succeed fine with the ca_certs_path + indexes.add. pip install 'avro-python3==1.10.0'
works fine either way.
Details: thanks to running with --pex-verbosity=9
(wish that was on the troubleshooting page!) found the following error:
OSError: Could not find a suitable TLS CA certificate bundle, invalid path: cert.pem
Given I provided a full path for ca_certs_path
I'm wondering what could be stripping off the rest?refined-addition-53644
12/14/2021, 9:15 AM./pants --version
Gets stuck just after finishing creating virtualenv. I was trying to do a fresh install. I had cleaned the ~/.cache/pants
curved-television-6568
12/14/2021, 10:03 AMNone
. đź§µrefined-addition-53644
12/14/2021, 11:07 AMpex
targets won't update itself by taking into account the changes in the provided 3rd party dependencies.
Whenever I run ./pants run <pex_target>
, if it fails because of some missing 3rd party dependency, it keeps failing even after I add that 3rd party dependency to say requirements.txt
. Is this expected?loud-laptop-17949
12/14/2021, 7:03 PMupdate-build-files
run only on BUILD files which have changed? In pre-commit and CI I would like to avoid checking every file if we can.loud-laptop-17949
12/14/2021, 8:59 PMgo generate
yet? I can't seem to find it in the docs or any issues tracking it.loud-laptop-17949
12/14/2021, 10:59 PMProcessExecutionFailure: Process 'Run `go list` to download and analyze all third-party Go packages' failed with exit code 1. ...
...
go: updates to go.mod needed, disabled by -mod=readonly; to update it:
go mod tidy
Yet go list
on its own doesn't cause errors. And go mod tidy
doesn't show any changes.hundreds-raincoat-83920
12/15/2021, 12:57 AMhundreds-raincoat-83920
12/15/2021, 2:57 AMtall-truck-67859
12/15/2021, 10:51 AMeval $(minikube docker-env)
and try to pants package the dockerfile again, I have this :
ProcessExecutionFailure: Process 'Building docker image recital/n20-dev:latest.' failed with exit code 1.
stdout:
stderr:
2021/12/13 16:15:16 http2: server: error reading preface from client 192.168.49.2:2376: bogus greeting "Client sent an HTTP requ"
read tcp 192.168.49.1:38404->192.168.49.2:2376: read: connection reset by peer
I assume that I have to change docker context in pants.toml (DOCKER_HOST value in [docker]) but I still get the same error.
Docker built . -t {imagetag:version}
doesn’t work either.
Thanks for help 🙂curved-television-6568
12/15/2021, 5:23 PMbusy-vase-39202
12/15/2021, 6:13 PMhundreds-raincoat-83920
12/15/2021, 8:42 PMfew-arm-93065
12/15/2021, 8:53 PMbitter-ability-32190
12/15/2021, 9:19 PMBUILD.pants
to sit next to our Bazel BUILD
files, so my first attempt was to try a (code) root BUILD.pants
with:
python_sources(name="source", sources=["**/*.py"])
python_tests(name="tests", sources=["**/test_*.py", "**/*_test.py"])
But I'm seeing a hearty dose of The following imports in a/b/c/d/test_foo.py:../../../../tests have no owners
which points to an import of a module which is just chilling next to the test.
---
No source roots at playhundreds-raincoat-83920
12/15/2021, 11:41 PMpex_binary(
name="train",
entry_point="train.py",
dependencies=[
"src/data:data",
"!!src/data:torch",
"examples/ml_example:torch"
]
)
and I still get `The target examples/ml_example/train.py imports torch.nn.functional
, but Pants cannot safely infer a dependency because more than one target owns this module, so it is ambiguous which to use: ['examples/ml_example:torch', 'src/data:torch']` . If I get rid of "!!src/data:torch"
pants says:
More than one direct requirement is satisfied by torch 1.10.1:
0. torch
1. torch>=1.10
My goal is to allow varying level of strictness - data should support a wide variety of torches, while other people can do what they want. Is there a better way than doing "!!src/data:torch"
?incalculable-yacht-75851
12/16/2021, 12:15 AMrequirements.txt
file will install a dependency in CI to give my script access to it from the shell. Now, I could just load black
as a module but I'd rather have all commands for black
, prettier
, scalafmt
, and any other formatters to be handled the same exact way (subprocess.run). Will black
be available from the shell w/ the requirements.txt file specifying black
as a dep?hundreds-raincoat-83920
12/16/2021, 12:46 AMrefined-addition-53644
12/16/2021, 9:32 AMplatform
option when building pex_binary
as mentioned in the documentation. Does this mean if I build a .pex
on macos and copy it to a docker whose base image which isn't mac, then I need to also build explicitly .pex
compatible with the base docker image?
https://www.pantsbuild.org/docs/reference-pex_binary#codeplatformscoderefined-addition-53644
12/16/2021, 1:24 PM3rdparty
. Just this
FROM public.ecr.aws/lambda/python:3.9
RUN yum -y install gcc
COPY ./3rdparty/requirements.txt .
RUN python3 -m ensurepip \
&& pip install --no-cache-dir -r requirements.txt
I keep getting this error
> [3/4] COPY ./3rdparty/requirements.txt .:
------
failed to compute cache key: "/3rdparty/requirements.txt" not found: not found