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

Return empty string when no BUILD file is available in our workspace #1288

Merged
merged 1 commit into from
Aug 23, 2024

Conversation

mering
Copy link
Contributor

@mering mering commented Aug 22, 2024

There are many cases where BUILD files are not available locally: Either they are available upstream or in BCR. Consumers of this function often ignore this return value anyways. Setting it to an empty string seems much more plausible then falling through an matching any other unsuitable case.

Related #1287

@drigz
Copy link
Contributor

drigz commented Aug 23, 2024

@vladmos FYI, I'm rodrigoq@, the author of the TODO, and while very ashamed that I allowed the code to fall through in this case as it doesn't seem to make any sense, this seems like a solid improvement.

Copy link
Member

@vladmos vladmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@vladmos vladmos merged commit 3488089 into bazelbuild:main Aug 23, 2024
2 checks passed
@mering mering deleted the interpret-label-bzlmod branch August 23, 2024 13:25
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.

3 participants