-
-
Notifications
You must be signed in to change notification settings - Fork 606
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
Change complete_platforms
to use file paths rather than target addresses
#15234
Comments
Ignorance of "how we do things" and no push back in PR that added complete_platform support to pex_binary from you or Benjy. The pattern then just rolled forward to lambdas. I'd be happy to have less targets as you well know, so hack away! |
Sounds good, no worries at all. My bad for not reviewing outside of a very cursory review a few days after you merged. |
complete_platforms
be file paths rather than target addresses?complete_platforms
to use file paths rather than target addresses
Some thoughts on how to do this. The relevant rule: pants/src/python/pants/backend/python/util_rules/pex.py Lines 105 to 124 in d8fba9a
Naively, we can try to evaluate the list as both The issue with that naive approach is we won't eagerly error on invalid entries. Pants tries hard to eagerly validate data so that we can raise likely issues in your code, e.g. typos. So, the best idea I have so far is that we evaluate each element in the list one-at-a-time. Try to parse it as -- We need to decide if we want to deprecate using a) we break existing users, which @jriddy and @jsirois have been encouraging us to be more cautious #16547 So I bias towards keeping both Either way, |
Keeping file targets to support URL fetching will probably be useful, I think part of the complete platforms PEP will be a "database" of these out at some set of URLs. That said, the fact that a target is needed for URL fetching is itself archaic. Certainly |
I think there's an additional one: using a target means the platform can be codegen-ed, e.g. an (In this sort of case, it's likely often possible to run the build in the docker image directly with an environments (especially once they're stable), but running cross-builds natively can be much faster, so complete platforms are still useful to minimise much emulation is required. And, also if one is trying to build a multi-platform PEX.) |
I don't think this is quite that simple - the |
Maybe this would be better solved with a macro or something. |
A user was confused when using
complete_platforms
thinking they could use a file path.I don't see the benefit of requiring a file target? It seems to me like unnecessary boilerplate, and requiring users to interact with some thing they often find confusing (targets).
If we change this to a file path, users can always still wrap that file in a
file
target for other uses.The text was updated successfully, but these errors were encountered: