Skip to content

Conversation

GuillaumeVW
Copy link
Contributor

Fixes an issue where using --excludeExternalTargets with --useCquery would cause bazel-diff to pass an empty query string to bazel query, resulting in a failure with exit code 2.
The problem was that when external targets are excluded, the code was still trying to execute a query on an empty list, which produced an empty string. Now we check if there are actually any repo targets to query before executing the query, otherwise we just skip it and use an empty list.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@GuillaumeVW GuillaumeVW marked this pull request as ready for review July 17, 2025 20:53
@GuillaumeVW GuillaumeVW force-pushed the fix/empty-query-excludeExternalTargets-cquery branch 3 times, most recently from 6499dc8 to fda7137 Compare July 18, 2025 15:34
@GuillaumeVW GuillaumeVW force-pushed the fix/empty-query-excludeExternalTargets-cquery branch from fda7137 to b9d95d7 Compare July 22, 2025 12:45
Copy link
Collaborator

@tinder-maxwellelliott tinder-maxwellelliott left a comment

Choose a reason for hiding this comment

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

Thanks!

@tinder-maxwellelliott tinder-maxwellelliott merged commit ce2b1f5 into Tinder:master Jul 23, 2025
8 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.

3 participants