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

Start Configuration of Python Gazelle #26

Merged
merged 20 commits into from
Jan 22, 2024
Merged

Conversation

michael-christen
Copy link
Owner

@michael-christen michael-christen commented Jan 22, 2024

Changes:

  • Establish a mechanism for defining external python requirements via a requirements.in, generating updates to a lock file with bazel run //:requirements.update
  • Configure gazelle python and protobufs
  • Configures via gazelle directives to use a file based approach, stick with the BUILD configuration, disable go, default visibility to private and resolve py imports
  • Update dev_setup to install openjdk (java), tree, ranger, ag

New Commands:

bazel run //:requirements.update
bazel run //:gazelle_python_manifest.update
bazel run //:gazelle

New Tests:

//:requirements_test
//::gazelle_python_manifest.test

Notes:

  • One of the recurring issues I have every time I deal with updating WORKSPACE is slight incompatibilities with various repos that result in incomprehensible output errors.
  • stackb/rules_proto is one of the only things that seems to support what I'm looking for, and while it is getting steady contributions hasn't pubilshed a release in about a year. https://github.com/rules-proto-grpc/rules_proto_grpc. Additionally, it could be handy to look into what it would take to make my own "shitty" version of these rules to learn more about what's going on in gazelle's / bazel's internals
  • bzlmod migration didn't go well for me, most tutorials out there still use WORKSPACE, might be good to look into in the future / figure out how to migrate piecemeal, but bypassed this and 7.0.1 bazel upgrade for now

Related Issues:

References:

Future Things to Look Into:

Copy link
Owner Author

@michael-christen michael-christen left a comment

Choose a reason for hiding this comment

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

Scrub XXXs a little, define test commands, update README for changing requirements, etc.

@michael-christen michael-christen merged commit d21e33d into master Jan 22, 2024
3 checks passed
@michael-christen michael-christen deleted the gazelle_and_more_apt branch January 22, 2024 04:09
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.

1 participant