-
-
Notifications
You must be signed in to change notification settings - Fork 631
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
Add architecture-awareness to platform #12367
Add architecture-awareness to platform #12367
Conversation
I think the most consequential decision I've made was to add architecture helpers to |
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.
Nice! This looks great, and I agree with using osutil.py for arch helpers.
MacOsX86_64, | ||
MacOsArm64, | ||
LinuxX86_64, |
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.
Maybe this would be less awkward? Technically you're supposed to do UpperCamelCase for enum variants, but we can turn off Clippy (Rust linter) for this one.
Macos_x86_64,
Macos_arm64,
Linux_x86_64,
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.
@stuhood thoughts?
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.
Yea, allowing snake case here probably makes sense. Can skip the lint with:
#[allow(non_snake_case)]
enum .. {
..
}
This is done, pending tests, unfortunately I cannot run tests because pex-tool/pex#1384 |
52b0b58
to
7d79c13
Compare
marking as ready to get CI's opinion |
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
[ci skip-rust] [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
[ci skip-rust] [ci skip-build-wheels]
[ci skip-rust] [ci skip-build-wheels]
7d79c13
to
dccac56
Compare
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Rust tests and lints will be skipped. Delete if not intended. [ci skip-rust] # Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
@Eric-Arellano Tests pass at this point, there are still remaining issues around running x86 and ARM side by side, but they're not coming from the Platform side of thigns. |
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.
Nicely done 🙌
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.
Looks good, thanks.
It would be good to fix the example in the pydoc of ExternalTool
to explain how to set the default_known_versions: https://github.com/pantsbuild/pants/pull/12367/files#diff-0591b1668767ffb0bf44c7197bfe0d73e1d4577327fdb1a2ee47c15a1ef463a1R57 ... and maybe also to reference how the dict lookups into the known_versions are computed?
# Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
@stuhood This commit should address most of your concerns. I am not sure what you mean about "referencing how the dict lookups … are computed" -- there is already complete documentation for |
Should be fine. Can follow up later if its not clear based on the existing examples. |
# Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
# Building wheels and fs_util will be skipped. Delete if not intended. [ci skip-build-wheels]
Great work @chrisjrn! Exciting :) |
Closes #10620. See #10620 and https://docs.google.com/document/d/1fFjMlQ7fLKsq3bomaoDoNgMxL2zMZPiqk0wjqZX8AFM/edit# for design doc.