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

Detect BUILD files after fetching the repo #538

Merged
merged 1 commit into from Jun 4, 2019
Merged

Detect BUILD files after fetching the repo #538

merged 1 commit into from Jun 4, 2019

Conversation

steeve
Copy link
Contributor

@steeve steeve commented Jun 4, 2019

The test wether there were build files in a go_repository were done
before actually fetching it, making gazelle always generate BUILD files,
instead of doing it automatically.

This fixes build_file_generation="auto".

The test wether there were build files in a go_repository were done
before actually fetching it, making gazelle always generate BUILD files,
instead of doing it automatically.

This fixes build_file_generation="auto".

Signed-off-by: Steeve Morin <steeve@zen.ly>
Copy link
Contributor

@jayconrod jayconrod left a comment

Choose a reason for hiding this comment

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

😳 I'm surprised no one has tripped over this already. I think this bug went in after the last release, but it's been there for a while.

Thanks for fixing.

@jayconrod jayconrod merged commit b661aec into bazelbuild:master Jun 4, 2019
@steeve steeve deleted the steeve/buildfilegen branch June 5, 2019 10:21
path = ctx.path(name)
if path.exists and not env_execute(ctx, ["test", "-f", path]).return_code:
generate = False
break
if fetch_repo_args or generate:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, generate should be removed! I'll do separate PR

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.

None yet

2 participants