loud-stone-80561
10/17/2024, 1:57 AMloud-stone-80561
10/17/2024, 1:59 AMdazzling-pizza-75442
10/17/2024, 2:02 AMloud-stone-80561
10/17/2024, 2:04 AM2.24.0.dev1
will have this - excited to try it out 🙏loud-stone-80561
10/17/2024, 2:15 AMcp
on mac.
I'm happy to make a contribution to fix this, but first want to understand if there's a preference to rely on system binaries vs something like shutil.copytree
loud-stone-80561
10/17/2024, 2:16 AMloud-stone-80561
10/17/2024, 2:17 AMhappy-kitchen-89482
10/17/2024, 12:45 PM@pytest.mark.platform_specific_behavior
so they’d be run on macoshappy-kitchen-89482
10/17/2024, 12:45 PMhappy-kitchen-89482
10/17/2024, 12:47 PMcopytree
or similar. @curved-manchester-66006, any special reason why it is via spawned cp process? Especially since we have to jump through a hoop to make sure the process isn’t cached.curved-manchester-66006
10/17/2024, 11:59 PMloud-stone-80561
10/18/2024, 1:20 PMloud-stone-80561
10/18/2024, 9:36 PMloud-stone-80561
10/21/2024, 1:47 AMshutil.copytree
here: https://github.com/pantsbuild/pants/pull/21551/commits/4d4f432bd05c2774a09e322bc1d160b386c56d12 - hopefully that addresses your feedback!loud-stone-80561
10/21/2024, 6:04 PMcurved-manchester-66006
10/21/2024, 7:50 PMor someone else - can a maintainer approve the CI run?I think (from the UI) CI is running; but let me know if you think a step is missing.
loud-stone-80561
10/21/2024, 8:04 PMhappy-kitchen-89482
10/21/2024, 8:12 PMloud-stone-80561
10/21/2024, 9:27 PMloud-stone-80561
10/24/2024, 2:30 AMloud-stone-80561
10/24/2024, 3:52 AMshutil.copytree
- it looks like the sandbox isn't accessible from the python side (is it possible due to the chroot)?
FileNotFoundError: [Errno 2] No such file or directory: '/private/tmp/pants-sandbox-vdbcPU'
(this error is from the python side)
Perhaps the best option here is to implement the intrinsic for copytree. what do you both think?happy-kitchen-89482
10/24/2024, 4:26 AMhappy-kitchen-89482
10/24/2024, 4:27 AMhappy-kitchen-89482
10/24/2024, 4:32 AMdownloaded_python.digest
as the relevant digest, you just need to materialize ithappy-kitchen-89482
10/24/2024, 4:34 AMhappy-kitchen-89482
10/24/2024, 4:36 AMcp
process was actually (whether knowingly or not) a way to bypass this issue and generate a side-effect in the workspace (I think - the copy target is BUILD_ROOT/.python_build_standalone
right?)happy-kitchen-89482
10/24/2024, 4:38 AM.python_build_standalone
in the cp
process’s sandbox, and that is mapped to an append_only_cache (which lives outside the workspace), so this is not a side effect.happy-kitchen-89482
10/24/2024, 4:38 AMhappy-kitchen-89482
10/24/2024, 4:39 AMcp
process, and set its arguments appropriately for each platform. Can that be done?loud-stone-80561
10/24/2024, 2:00 PM>>> system, _, _, _, _, machine = platform.uname()
>>> system
'Darwin'
>>> machine
'arm'
>>>
happy-kitchen-89482
10/24/2024, 6:19 PMpants.engine.platform.Platform
as an argument to your @rule, and the engine will fill it in with the correct valueloud-stone-80561
10/24/2024, 6:29 PM