happy-kitchen-89482
06/09/2021, 6:53 AMancient-vegetable-10556
06/11/2021, 8:15 PMchrisjrn@chrisjrns-MacBook-Pro pants % lipo -info /Users/chrisjrn/src/pants/src/python/pants/engine/internals/native_engine_pyo3.so
Non-fat file: /Users/chrisjrn/src/pants/src/python/pants/engine/internals/native_engine_pyo3.so is architecture: arm64
hundreds-father-404
06/12/2021, 6:32 PMenough-analyst-54434
06/14/2021, 2:59 AMwitty-crayon-22786
06/14/2021, 5:00 PMhundreds-father-404
06/14/2021, 5:45 PMremote_cache_write_{started,finished,errors}
, I wish we did {start,success,error}
. That is, finished
is currently a superset of errors
, and it would be more useful for analysis if it was disjoint
How would we want to approach API stability for metrics? Note that it's a good time to make this change now because they weren't working how we wanted anyways https://github.com/pantsbuild/pants/issues/12019witty-crayon-22786
06/15/2021, 5:08 PMwitty-crayon-22786
06/15/2021, 5:11 PM$ cat ~/.pants.rc
[python-setup]
# Avoid system python.
interpreter_search_paths = ["<PYENV>"]
…which works for the outer run, but which is currently (intentionally) disabled in inner/test runshundreds-father-404
06/15/2021, 8:33 PMinterpreter_constraints
on a pex_binary
target would override the transitive closure. In v2, we "fixed" it to instead act like all other interpreter constraints, to be mixed in.
The practical impact is described in https://www.pantsbuild.org/docs/python-interpreter-compatibility#using-multiple-python-versions-in-the-same-project
This means that every dependency of a target must also be compatible with its interpreter constraints.Thoughts if that was a mistake or not?
ancient-vegetable-10556
06/16/2021, 5:48 PMhundreds-father-404
06/17/2021, 11:52 PMmain
and run ./cargo fmt
? Do you get changes?bored-art-40741
06/20/2021, 6:28 PMTarget
subclass, JavaLibrary. When I use the java_library
alias in a BUILD file with two Java sources present (using the default pattern to capture all non-test .java
sources), I expect a single JavaLibrary
target to be produced in the build graph. But instead, there are 3 targets: //:lib
, which depends on //ExampleLib.java:lib
and //OtherLib.java:lib
(corresponding to the two source files). I can sort of see based on my past experience with Pants why we might be generating "synthetic" targets in this situation to more cleanly encapsulate source files, but here's the catch: the two "synthetic" targets depend on each other (circularly). This doesn't appear to directly upset the build graph, but it does cause my rule to break since it introduces a cycle in the rule graph. Am I using this API wrong, or is this just something that hasn't been an issue for Pants yet because the Python rules don't have to distinguish between direct and transitive dependencies much?witty-crayon-22786
06/21/2021, 9:32 PMfuture::select_all
that preserves the order of the remaining tasks, and was reminded that i pointed out that it shouldn’t in the first place =Sfast-nail-55400
06/22/2021, 2:16 AMincrement_counter
was moved to the workunit, unclear how to model this situation. Would the code just call in_workunit!
and increment the counter in a trivial child workunit?witty-crayon-22786
06/22/2021, 2:21 AMhundreds-father-404
06/22/2021, 10:07 PM[black].version
then run `./pants fmt`: how important do you think it is that black_lock.txt
gets regenerated, vs. something like warning or erroring that you should run ./pants lock
?
I'm wondering if the latter is adequate so that we can punt on secondary effects in downstream rules: https://github.com/pantsbuild/pants/issues/12014. Trying to keep the scope of lockfile project tightwitty-crayon-22786
06/23/2021, 9:35 PM2.6.0rc0
?witty-crayon-22786
06/25/2021, 12:24 AMbored-art-40741
06/26/2021, 8:53 PMREADME.md
files within nested subfolders where such documentation is warranted? I'm to the point on some projects where I need to write some prose and long examples as long-term documentation, and it likely doesn't belong in code comments/docstrings. On the other hand, I'm not sure that the user facing docs website is the best place either, since it's still an experimental backend and the documentation is very much into the weeds about the backend itself. Any thoughts?happy-kitchen-89482
06/28/2021, 2:50 PMaverage-vr-56795
07/01/2021, 6:30 PMwitty-crayon-22786
07/02/2021, 12:04 AMhappy-kitchen-89482
07/02/2021, 9:16 PMpython_library
X depends on a python_distribution
Y then X effectively depends on all of the libraries Y depends on, transitively, as sources, and nothing special happens with Y itself. You could replace it with its direct deps with no change in behavior. But what the author of that dep probably intended is for X to depend on the wheel built from Y. An example of where this is useful is when you have a python_distribution
that builds native code via a custom setup.py
(this is now possible! See https://github.com/pantsbuild/pants/pull/12250). AFAICT today we handle this as a special case, only for running tests, via runtime_package_dependencies
. But it seems like we should do this generically?chilly-magazine-21545
07/03/2021, 5:20 AMbored-art-40741
07/06/2021, 8:27 PMchilly-magazine-21545
07/07/2021, 11:41 AMfresh-cat-90827
07/07/2021, 6:24 PMpex_binary
target docstring to comment on packaging multiplatform PEX files.
https://github.com/pantsbuild/pants/blob/f9b5815352cb571e98f3214a23b83c86f96ee2a7/src/python/pants/backend/python/target_types.py#L242
So the idea is that it is possible to create multi-platform PEX files so that the very same .pex
file can be distributed and run both on Linux and MacOS device. This is achieved by adding multiple platform tags for the pex_binary
target declaration.
This will make sure that the .pex
file contains wheels for both platforms (e.g., if numpy
is a requirement, then there will be one .whl
file for numpy
compiled for MacOS and one .whl
file for numpy
compiled for Linux).
If there are many requirements with compiled non-Python code, a multi-platform PEX file can be significantly larger than a platform-specific one.
It wasn’t clear to me that multiple wheel files will be included (one for each target platform) which became obvious once I have unzipped the .pex
file and inspected the .deps
directory. Do you think that it’s worth adding this to the docstring?
Do you like this wording or it could be expressed in a better way?
--- a/src/python/pants/backend/python/target_types.py
+++ b/src/python/pants/backend/python/target_types.py
@@ -241,7 +241,9 @@ class PexPlatformsField(StringSequenceField):
help = (
"The platforms the built PEX should be compatible with.\n\nThis defaults to the current "
"platform, but can be overridden to different platforms. You can give a list of multiple "
- "platforms to create a multiplatform PEX.\n\nTo use wheels for specific "
+ "platforms to create a multiplatform PEX. A multiplatform PEX file will contain platform "
+ "specific wheels for each 3rd party requirement that has some non-Python "
+ "code that requires compilation. \n\nTo use wheels for specific "
"interpreter/platform tags, you can append them to the platform with hyphens like: "
'PLATFORM-IMPL-PYVER-ABI (e.g. "linux_x86_64-cp-27-cp27mu", '
'"macosx_10.12_x86_64-cp-36-cp36m"):\n\n - PLATFORM: the host platform, e.g. '
curved-television-6568
07/08/2021, 2:08 PMException: Could not find a rule to satisfy Get(Targets, UnparsedAddressInputs, UnparsedAddressInputs(values=('//src/python/foo/qux:bin',), relative_to='src/python/foo')).
What could I be missing?average-vr-56795
07/08/2021, 8:42 PMwitty-crayon-22786
07/09/2021, 1:37 AM--loop
, pantsd
will not restart itself, even when you’ve edited the code of pants itself.