-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support key
callback parameter for min()
, max()
starlark builtin functions
#15022
Comments
I light of #15122 - let me clarify how I see the feature needs to be implemented. Naturally, we do not want to call Thus ideally, I'd like to see an efficient, lightweight sort-key helper that would be shared between the implementations of |
Thank you for contributing to the Bazel repository! This issue has been marked as stale since it has not had any activity in the last 1+ years. It will be closed in the next 90 days unless any other activity occurs or one of the following labels is added: "not stale", "awaiting-bazeler". Please reach out to the triage team ( |
This issue has been automatically closed due to inactivity. If you're still interested in pursuing this, please post |
@bazel-io fork 7.2.0 |
This is required by the language spec, but was not implemented in Bazel. See https:/bazelbuild/starlark/blob/master/spec.md#max Fixes bazelbuild#15022 Also take the opportunity to adjust sorted's signature for `key` to match. RELNOTES: Starlark `min` and `max` buitins now allow a `key` callback, similarly to `sorted`. PiperOrigin-RevId: 623547043 Change-Id: I71d44aa715793f9f2260f9b20b876694154ff352
This is required by the language spec, but was not implemented in Bazel. See https:/bazelbuild/starlark/blob/master/spec.md#max Fixes #15022 Also take the opportunity to adjust sorted's signature for `key` to match. RELNOTES: Starlark `min` and `max` buitins now allow a `key` callback, similarly to `sorted`. PiperOrigin-RevId: 623547043 Change-Id: I71d44aa715793f9f2260f9b20b876694154ff352 Commit cf66672 Co-authored-by: Googler <[email protected]>
This is required by the language spec, but was not implemented in Bazel. See https:/bazelbuild/starlark/blob/master/spec.md#max Fixes bazelbuild#15022 Also take the opportunity to adjust sorted's signature for `key` to match. RELNOTES: Starlark `min` and `max` buitins now allow a `key` callback, similarly to `sorted`. PiperOrigin-RevId: 623547043 Change-Id: I71d44aa715793f9f2260f9b20b876694154ff352
A fix for this issue has been included in Bazel 7.2.0 RC1. Please test out the release candidate and report any issues as soon as possible. |
See https:/bazelbuild/starlark/blob/master/spec.md#max
The text was updated successfully, but these errors were encountered: