Skip to content

Start Configuration of Python Gazelle#26

Merged
michael-christen merged 20 commits intomasterfrom
gazelle_and_more_apt
Jan 22, 2024
Merged

Start Configuration of Python Gazelle#26
michael-christen merged 20 commits intomasterfrom
gazelle_and_more_apt

Conversation

@michael-christen
Copy link
Copy Markdown
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
Copy Markdown
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
@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