happy-kitchen-89482
12/09/2022, 4:19 AMhappy-kitchen-89482
12/09/2022, 4:20 AMhappy-kitchen-89482
12/09/2022, 4:21 AMhappy-kitchen-89482
12/09/2022, 4:22 AMhappy-kitchen-89482
12/09/2022, 4:23 AMhappy-kitchen-89482
12/09/2022, 4:24 AMlemon-oxygen-72498
12/09/2022, 11:21 AMpants
usage at my client, publishing changed libraries automatically š I had in mind to use --changed-since
and package
for that. But I can't achieve to have pants
build the changed libraries. Consider this example trying to build our geometry
library:
Here are the library's direct dependencies:
ā ./pants dependencies libs/geometry:kaiko-geometry-dist
libs/geometry/kaiko/geometry/__init__.py:../../kaiko-geometry
libs/geometry/kaiko/geometry/_point_utils.py:../../kaiko-geometry
libs/geometry/kaiko/geometry/geometry_box.py:../../kaiko-geometry
libs/geometry/kaiko/geometry/geometry_point.py:../../kaiko-geometry
libs/geometry/kaiko/geometry/geometry_polygon.py:../../kaiko-geometry
libs/geometry/kaiko/geometry/geometry_size.py:../../kaiko-geometry
libs/geometry/kaiko/geometry/geometry_square.py:../../kaiko-geometry
I have modified a file of the library in the last commit (added a print):
ā git diff --name-only HEAD~1
libs/geometry/kaiko/geometry/geometry_polygon.py
The library has a python_distribution
stanza:
ā grep -A 2 python_distribution libs/geometry/BUILD
python_distribution(
name="kaiko-geometry-dist",
dependencies=[":kaiko-geometry"],
So I am expecting this command would create the library's wheel: ā ./pants --changed-since=HEAD~2 --changed-dependees=direct --filter-target-type=python_distribution package
but it leaves dist/
empty š (whereas ./pants --filter-target-type=python_distribution package ::
does generate the concerned library's wheel).
What am I misunderstanding/doing wrong?chilly-tailor-75063
12/09/2022, 3:02 PM./pants fmt ::
with success. I also use ./pants lint ::
, but with mixed results. It helps me find various code issues, but I get this: āE0401: Unable to import ā<some required module>ā (import-error)ā for all my required modules. My project is setup with a remote Python interpreter (Python 3.10.8) in a Docker container. Iām also using Poetry to manage the dependencies. Iām not sure what to do to resolve this, other than tell pylint to stop reporting on E0401 errors.brief-ambulance-96324
12/09/2022, 3:12 PMbrief-ambulance-96324
12/09/2022, 3:20 PMfresh-cat-90827
12/09/2022, 5:14 PMconftest.py
fixtures and what are the best practices you've discovered? GitHub Discussion with more information is herehappy-kitchen-89482
12/09/2022, 5:20 PM--debug
?loud-laptop-89838
12/09/2022, 6:03 PM.env
file, but hardcoding the file into a BUILD
file doesn't work well since .env
isn't tracked in version control, so CI tests throw warnings. I'm wondering whether a better approach is a plugin that explicitly loads the .env
variables as environment variables for the test, then run that plugin as a command line argument to test? That way I could run it locally, but not include it in CI.
Two things I'm wondering about:
1. would this approach work? I know tests are "hermetic", so would building a plugin that loads the variables work?
2. Can you "stack" targets; e.g. call the .env
plugin prior to test so that they work together?high-yak-85899
12/09/2022, 6:13 PMpants.toml
invalidates lots of build caches. There are sections of pants.toml
that we would expect to change more regularly (e.g. cli aliases). Are there any thoughts about how to separate/shield from that?wide-midnight-78598
12/09/2022, 9:34 PMcc
dependency inference question: https://github.com/pantsbuild/pants/pull/17738#discussion_r1042519097
In short, would Source Roots be equivalent to include_directories
in C land?glamorous-accountant-97217
12/09/2022, 9:42 PMextra_requirements
to pytestlate-keyboard-89314
12/09/2022, 11:00 PMpants tailor ::
to generate my build files. But now, no matter what target I do such as pants check
or pants list
, I get a crash with the following:
15:53:39.68 [ERROR] 1 Exception encountered:
IncompleteJSONError: parse error: trailing garbage
mod", "GoVersion": "1.19" } { "Path": "<http://cloud.google.com/go|cloud.google.com/go>
(right here) ------^
late-keyboard-89314
12/09/2022, 11:01 PMag
doesnāt pull up matching code in my repo. I assume this is some internal JSON that pants is generating, but Iām not sure why it would be malformedbrief-ambulance-96324
12/09/2022, 11:54 PM./pants test --force test/unit::
it takes 1 minute 20 seconds. So concurrency can significantly but not completely mitigate the overheadhappy-kitchen-89482
12/09/2022, 11:56 PM./pants test --debug
?glamorous-accountant-97217
12/09/2022, 11:58 PMpants test
at all-- just running an interactive python session that talks to this service built by pants. i donāt remember whether I had the same problem when running pants pytests that talked to the service, but i canāt imagine that would make a differencebroad-processor-92400
12/10/2022, 12:03 AMexport-codegen
goal is part of the pants.backend.docker
backend, but... I can't think of why it would need to be associated with docker. Am I missing something? https://www.pantsbuild.org/docs/reference-export-codegenhappy-kitchen-89482
12/10/2022, 12:43 AM./pants run ...
?happy-kitchen-89482
12/10/2022, 12:44 AMglamorous-accountant-97217
12/10/2022, 12:45 AM./pants run
glamorous-accountant-97217
12/10/2022, 12:47 AMglamorous-accountant-97217
12/10/2022, 12:47 AMglamorous-accountant-97217
12/10/2022, 12:48 AMEOFError: connection closed by peer
glamorous-accountant-97217
12/10/2022, 12:48 AM./pants run pushdown_service/service.py
. normally I do ./pants package pushdown_service/::
and then dist/pushdown_service.service.pex
glamorous-accountant-97217
12/10/2022, 5:09 AMForkingServer
. @clever-hamburger-59716 suggested ThreadedServer
and that let me debug! Iām not sure why