Skip to content
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

Allow map_each to return None in TemplateDict#add_joined #16924

Closed
wants to merge 1 commit into from

Conversation

fmeum
Copy link
Collaborator

@fmeum fmeum commented Dec 6, 2022

Mimics the behavior of Args#add_all's map_each callback and can be used to skip over values.

Also improves the error message when the callback returns an unexpected type by including the value.

@fmeum fmeum marked this pull request as ready for review December 6, 2022 12:35
@fmeum
Copy link
Collaborator Author

fmeum commented Dec 6, 2022

@hvadehra Could you review? I found this small feature very useful while picking up computed substitutions.

Mimics the behavior of `Args#add_all`'s `map_each` callback and can be
used to skip over values.

Also improves the error message when the callback returns an unexpected
type by including the value.
@sgowroji sgowroji added team-Core Skyframe, bazel query, BEP, options parsing, bazelrc awaiting-review PR is awaiting review from an assigned reviewer labels Dec 6, 2022
@hvadehra hvadehra added awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally area-java-Starlark_API java_common, JavaInfo and other Starlark Java modules and removed awaiting-review PR is awaiting review from an assigned reviewer team-Core Skyframe, bazel query, BEP, options parsing, bazelrc labels Dec 6, 2022
@copybara-service copybara-service bot closed this in db68419 Dec 7, 2022
@brentleyjones
Copy link
Contributor

We could probably get this into 6.1.0, right?

@sgowroji sgowroji removed the awaiting-PR-merge PR has been approved by a reviewer and is ready to be merge internally label Dec 7, 2022
@fmeum fmeum deleted the 1920-skip-join-none branch December 7, 2022 17:26
@fmeum
Copy link
Collaborator Author

fmeum commented Dec 7, 2022

@bazel-io flag

@bazel-io bazel-io added the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Dec 7, 2022
@meteorcloudy
Copy link
Member

@bazel-io fork 6.1.0

@bazel-io bazel-io removed the potential release blocker Flagged by community members using "@bazel-io flag". Should be added to a release blocker milestone label Dec 14, 2022
ShreeM01 added a commit that referenced this pull request Jan 21, 2023
Mimics the behavior of `Args#add_all`'s `map_each` callback and can be used to skip over values.

Also improves the error message when the callback returns an unexpected type by including the value.

Closes #16924.

PiperOrigin-RevId: 493609265
Change-Id: Ia9e42dd7edc2928a9945ce647d638fcb94037bc8

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-java-Starlark_API java_common, JavaInfo and other Starlark Java modules
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants