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

gazelle: Fail when errors occur #202

Conversation

stevebarrau
Copy link
Collaborator

@stevebarrau stevebarrau commented Sep 4, 2023

Instead of introducing a fail-fast, leverage the lifecycle to fail the extension when errors that would produce invalid build files occur.

Intead of introducing a fail-fast, leverage the lifecycle to fail the
extension when errors that would produce invalid build files occur.
Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

LGTM! Can you add an integration test or two showing this working?

java/gazelle/testdata/lib_with_invalid_label_in_runtime_deps has an example of a test where we run gazelle and expect it to fail with specific output.

@stevebarrau
Copy link
Collaborator Author

Added 2 tests:

  • one where there is a collision
  • one where there is a collision and the developer added the required resolve directive

Copy link
Collaborator

@illicitonion illicitonion left a comment

Choose a reason for hiding this comment

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

Thanks!

@illicitonion illicitonion merged commit 8ff3022 into bazel-contrib:main Sep 4, 2023
2 checks passed
@stevebarrau stevebarrau deleted the fail-the-extension-when-errors-occur branch October 11, 2023 06:54
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