Skip to content

Remove more hasattr/getattr calls in go_context #4054

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

Merged
merged 1 commit into from
Aug 20, 2024

Conversation

dzbarsky
Copy link
Contributor

What type of PR is this?
starlark cleanup

What does this PR do? Why is it needed?
The current logic to grab all the providers is confusing; it runs the fallback logics even in the case when go_context_data is found. Easier to follow when we pass the data in explicitly, and a bit faster as well.

I also considered making a go_context_v2 api that doesn't have all the fallbacks and using that to power go_context, but didn't do it for now.

Which issues(s) does this PR fix?

Fixes #

Other notes for review

@fmeum fmeum enabled auto-merge (squash) August 20, 2024 06:53
@fmeum fmeum merged commit f3029e2 into bazel-contrib:master Aug 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants