big-crayon-94763
04/14/2022, 8:15 PM2.12.0.dev2
for the new rule_helper
function and getting this: ERROR: No matching distribution found for pantsbuild.pants==2.12.0.dev2
looks like the package is up there though. Any idea what is going on?freezing-area-97131
04/14/2022, 8:21 PMthrift_sources(
name='gen',
sources=['*.thrift'],
)
When I run ./pants run …, I got this:
Could not find include file xxx.thrift
It looks like it couldn’t find each other in the same folder. How do I fix this?freezing-area-97131
04/14/2022, 9:14 PMERROR: Could not find a version that satisfies the requirement myproject.common==1.0
ERROR: No matching distribution found for myproject.common==1.0
This is a package that only used in my org.
How do I add the path of the file? Back in the days there was a repository
field to specify the path.
python_requirement(
name='myproject.common',
dependencies=[':salt', ':pymysql'],
requirements=[
'myproject.common==1.0',
],)
bitter-ability-32190
04/14/2022, 9:27 PMhigh-yak-85899
04/14/2022, 9:28 PMBUILD
files in all directories. Is there any way to make a python_distribution
that does something like src/my_project::
in the dependencies
section? Am I forced to make a pyproject.toml
to do that specifying?hundreds-father-404
04/14/2022, 9:38 PMfreezing-area-97131
04/14/2022, 11:51 PM$ ./pants run bin:xxx
⠠ 867.12s Building xxx.pex with 77 requirements: ...
colossal-wire-19277
04/15/2022, 8:57 AMfreezing-area-97131
04/15/2022, 12:46 PM./pants test …
and got this error:
ProcessExecutionFailure: Process 'Building requirements.pex with 23 requirements: ...
How do I fix this? I will put the full log in thread.late-crowd-50237
04/15/2022, 3:59 PMpantsbuild/actions/expose-pythons
?
(Context, I'm investigating picking up the PR for adding a Windows CI and support for Windows into Pex, but I'm stuck on an error that is coming out of this action)swift-dawn-80732
04/17/2022, 12:54 PMpants.backend.docker
to the list of backend packages:
ModuleNotFoundError: No module named 'pants.backend.docker.register'
09:50:00.53 [ERROR] Failed to load the pants.backend.docker.register backend: ModuleNotFoundError("No module named 'pants.backend.docker.register'")
has anybody faced this issue?swift-dawn-80732
04/17/2022, 2:00 PMResolveError(
pex.environment.ResolveError: Failed to resolve requirements from PEX environment @ /root/.pex/unzipped_pexes/1bc1b3d05270a6cb192aecf5a51715e951da993c.
Needed cp39-cp39-manylinux_2_31_x86_64 compatible dependencies for:
1: MarkupSafe>=2.0
Required by:
FingerprintedDistribution(distribution=Jinja2 3.1.1 (/root/.pex/installed_wheels/0893af5400986fb3b6c0f06db963e45dd7e2e9be91f476133910371878af80e8/Jinja2-3.1.1-py3-none-any.whl), fingerprint='0893af5400986fb3b6c0f06db963e45dd7e2e9be91f476133910371878af80e8')
But this pex had no 'MarkupSafe' distributions.
in `pants.toml`:
[python]
interpreter_constraints = ["CPython==3.9.10"]
debug logs when running `./pants package src/app/Dockerfile --level=debug`:
10:39:20.62 [DEBUG] Completed: Find Python interpreter for constraints - Selected /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3.8 to run PEXes with.
ripe-analyst-17330
04/18/2022, 1:19 PMpython
in the PATH
) or otherwise use my system python from MacOS. however, it seems to behave in a completely unexpected way. In the output (see thread), you can see that I'm running in a 3.10
venv, pants uses a seemingly random 3.9
binary from my pyenv shims, and then when the goal is run, it uses a 3.7
binary (maybe the original system binary?).hundreds-father-404
04/18/2022, 4:59 PMincalculable-yacht-75851
04/18/2022, 11:37 PMwide-zoo-86070
04/19/2022, 4:49 PMcalm-ambulance-65371
04/19/2022, 5:06 PM2.10.1rc0
(and 2.10.0
) where a python_distribution
will generate a .tar.gz
which gets enumerated by isolate_local_dist_wheels
and subsequently fails when unzip -Z1
returns a non 0 exit code because it has no idea what to do with a .tar.gz
loud-laptop-17949
04/19/2022, 6:12 PMsrc/django_apps/files/models.py:21:0: E0401: Unable to import 'util.url' (import-error)
Though pants shows them as a dependency:
$ p dependencies src/django_apps/files/models.py
...
src/util/url.py
What am I missing here?sparse-lifeguard-95737
04/19/2022, 8:45 PM20:40:20.36 [WARN] Failed to read from remote cache (1 occurrences so far): Error saving remote output directory: Tree with digest Digest { hash: Fingerprint<9b9b5334c93106332e06ff5ea71502451964b70a1b2a9c0d52e021cd26203f57>, size_bytes: 260 } was not in remote
specifically I’m confused that it says both failed to read
and error saving
- one I might expect on a cache-miss, but the other would indicate some misconfiguration with our remote caching setup (I think?)sparse-lifeguard-95737
04/19/2022, 8:45 PMpants.toml
so I’m guessing that was the cause of the above. we’ve been doing a lot of modification to that file so maybe that’s why we miss the cache so often. leaving the above as a request for a more clear error message 🙂hundreds-father-404
04/20/2022, 4:04 AMexport
in 2.12 will now export a venv for each tool Pants uses like black
and isort
. So, you can point your IDE to use those binaries. Thank you!witty-family-13337
04/20/2022, 1:28 PMException: Error communicating with server: Client exited before the server's result could be returned.
Which makes me think that the nailgun server process was killed/crashed. In MacOS the result is more dramatic, after a while you start getting warnings from the OS saying that you are out of memory leading to the whole computer crashing.
The only way we have found now to control this is by using [GLOBAL].process_execution_local_parallelism
, which is a blunt hammer as it affects all processes.bitter-ability-32190
04/20/2022, 4:02 PMpants_ignore.add
to not ignore a `.gitignore`d dir.
# .gitignore
/deps/libs/*/versions/
# pants.toml
pants_ignore.add = [
"!/deps/libs/thing/versions/active",
]
# deps/libs/thing/BUILD.pants
files(
name="srcs",
sources=["versions/active/src/**"],
)
Results in:
Unmatched glob from deps/libs/thing:srcs's `sources` field: "deps/libs/thing/versions/active/src/**"
full-ocean-15873
04/20/2022, 6:08 PMrefined-addition-53644
04/20/2022, 6:48 PMpackage
BUILD
__init__.py
-- sub-pkg1
-- sub-pkg2
then later we do say for testing
from package.sub-pkg1 import func1
pants will complain that this package.sub-pkg1
isn't a package since it can't infer the dependency unless I explicitly add in BUILD sub-pkg1
as dependency for package
. Basically is there a way around providing this explicit dependency in such case.refined-addition-53644
04/20/2022, 7:54 PMlib
, but I can list the directory. Please see the 🧵full-ocean-15873
04/20/2022, 7:57 PM[python-repos]
indexes.add = []
freezing-area-97131
04/21/2022, 5:56 AM./pants test xxx:all_test
And there would be a BUILD
file under xxx
like this:
target(
name='all_test',
dependencies=[
':aaa',
':bbb',
],
)
and then it will look into aaa
and bbb
recursively to find python_tests
but in this newer version (2.10) of pants when I do the same thing, I will get this warning:
22:51:00.65 [WARN] No applicable files or targets matched. The `test` goal works with these target types:
* junit_test
* python_test
* scala_junit_test
* scalatest_test
However, you only specified targets with these target types:
* target
and it doesn’t run any test.
What should I do to make BUILD
files behave like they did in the past?wide-zoo-86070
04/21/2022, 2:34 PMred-ghost-2220
04/21/2022, 2:48 PM