-
-
Notifications
You must be signed in to change notification settings - Fork 644
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include the Pants native client in released wheels #18957
Include the Pants native client in released wheels #18957
Conversation
836cceb
to
2ee568a
Compare
Just to get a sense of timelines and expectations. Should we do this once we bump to 2.18, which includes only publishing one wheel to PyPI (because we're assuming |
I don't think that we need to, no. I have been using the native client in the |
Oh sorry I left out, I meant for size's sake. So we aren't adding even more to our wheel uploads? |
#18838 dropped Linux wheel sizes by 40% (~30MB per wheel), and this change adds ~5MB back to wheel sizes for Linux and ~1MB for macOS... I think that it's fine? |
Ha! Okie dokie |
set +e | ||
"${PANTS_NATIVE_EXE}" "$@" | ||
"${NATIVE_CLIENT_BINARY}" "$@" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you intend to get some mileage on _PANTS_SERVER_EXE here? Seems good to do.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't (yet): it's mentioned in the description as something that would be worth doing. But I think that doing it requires significant refactoring of this script to split it into pants
vs pants_server
scripts.
7784f9a
to
178fa29
Compare
This change uses the `native-client` binary included in `pantsbuild/pants` wheels by pantsbuild/pants#18957 (and further adjusted in pantsbuild/pants#19010) to launch `pants`. See that change for the performance impact.
The Pants native client which was introduced in #11922 has so far only been usable in the Pants repo when the
USE_NATIVE_PANTS
environment variable was set.To make the native client available to end users, this change begins distributing the native-client binary in Pants wheels. A corresponding change in the
scie-pants
repo (pantsbuild/scie-pants#172) uses the native client to runpants
.To reduce the surface area of
scie-pants
(rather than having it be responsible for handling the special75
exit code similar to thepants
script integration), this PR also moves to having the native-client execute its own fallback (viaexecv
) to the Pants entrypoint. In future, thepantsbuild/pants
pants
script could also use that facility (e.g. by specifying a separatepants_server
bash script as the entrypoint to use as the_PANTS_SERVER_EXE
).As originally demonstrated on #11831, the native client is still much faster than the legacy client. Using pantsbuild/scie-pants#172, the timings look like:
Fixes #11831.