Skip to content

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

Merged
vladmos merged 1 commit intobazelbuild:mainfrom
mering:interpret-label-bzlmod
Aug 23, 2024
Merged

Return empty string when no BUILD file is available in our workspace#1288
vladmos merged 1 commit intobazelbuild:mainfrom
mering:interpret-label-bzlmod

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
@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