Skip to content

refactor: Updating example to only use bzlmod and updates to example #1147

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

Closed
wants to merge 3 commits into from

Conversation

chrislovecnm
Copy link
Contributor

@chrislovecnm chrislovecnm commented Apr 3, 2023

This commit updates the gazelle example to only use bzlmod. The example was previously set up to support bzlmod and also pre-bzlmod configurations, but moving forward I recommend just using bzlmod. We also missed a change in gazelle because bzlmod was picking up elements from the WORKSPACE file.

This commit removes the CI for the legacy bazel support as well.

I have updated one of the Python unit test names as well. Gazelle supports unit tests named test.py and also unit tests that are named the same as the package name and prefixed or suffixed with the word "test". This example now includes two of the
three naming schemes.

Another commit in this PR contains the code in #1146. That commit will fall
off once that PR is merged.

@chrislovecnm chrislovecnm force-pushed the bzlmod-updates branch 2 times, most recently from ff20381 to 6412997 Compare April 3, 2023 17:59
This commit updates the gazelle example to only use bzlmod.  The
example was previously set up to support bzlmod and also
pre-bzlmod configurations, but moving forward I recommend just
using bzlmod.  We also missed a change in gazelle because
bzlmod was picking up elements out of the WORKSPACE file.

This commit removes the CI for the legacy bazel support as well.
@chrislovecnm
Copy link
Contributor Author

/retest

Gazelle supports Python unit test names that are either __test__.py
or $(package_name)_test.py.  I am refactoring the example to
use both naming schemes.
@chrislovecnm chrislovecnm changed the title refactor: Updating example to only use bzlmod refactor: Updating example to only use bzlmod and updates to example Apr 3, 2023
@aignas
Copy link
Collaborator

aignas commented Apr 4, 2023

Please rebase on #1146 as it has the empty WORKSPACE.bzlmod file. Given that we have fixed the example to be correct and work under bzlmod as expected should we still remove the old setup? There could be users that are still using legacy WORKSPACE way of including deps and using bzlmod may not be feasible for them yet.

@chrislovecnm
Copy link
Contributor Author

@aignas i would like to remove the WORKSPACE file contents. The readme refers to GitHub tag that contains a working version not using bzlmod. I am using this code for a tutorial and leaving the WORKSPACE file will make it confusing.

@aignas
Copy link
Collaborator

aignas commented Apr 4, 2023

LGTM to refer to a historic version of the example. My only reservation would be the fact that this is being used as an integration test that may be useful to check for regressions. Maybe we could split this into two examples then?

@chrislovecnm
Copy link
Contributor Author

@aignas that is a fair point about the testing. I will modify the bzlmod example to include gazelle. I don't want to create yet another example that we are maintaining.

@aignas
Copy link
Collaborator

aignas commented Apr 5, 2023

@chrislovecnm, SGTM. Having the bzlmod example contain gazelle support is probably the better alternative of the two.

@chrislovecnm
Copy link
Contributor Author

Closing because we have #1155.

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