Comments (5)
Thanks @moshe - I think this is a better question for @dzbarsky - so shooting over.
We do use bazel, but the way it fits into our system isn't straightforward to extract directly into a BUILD file here. Would be happy to take a contribution here if you have one that works for you.
from mypy-protobuf.
@moshe Hi, are you looking for a build file to build the go binary itself, or a fuller integration to run the generation process within the bazel build itself (i.e. write the generated pyi files into runfiles)?
from mypy-protobuf.
Hi @dzbarsky, @nipunn1313, Thank you for your time
I dug in a little deeper and ended up opening a PR for making the protobuf python rule to accept external plugins - protocolbuffers/protobuf#7056
But in addition, I struggled to make bazel run the go implementation due to the folder structure of the project
A BUILD example of running the go plugin will be great ๐
from mypy-protobuf.
Got it. As a quick disclaimer, we actually don't use the upstream protobuf python rules, so we can't help with that bit, but it sounds like you've got it covered.
The current process of open-sourcing the go generator is pretty manual so it actually isn't fully up to date in the repo. I'm doing a bit of work today/tomorrow to improve that, after which it should show up in https://github.com/dropbox/dbx_build_tools complete with the BUILD files necessary. You should be able to add that repo as an external workspace and point to the binary rule.
Hope that's what you were looking for, and will update this thread once that's complete!
from mypy-protobuf.
@moshe https://github.com/dropbox/dbx_build_tools/blob/master/go/src/dropbox/build_tools/protoc-gen-mypy/BUILD is the rule we use to compile the generator. If you pull in our repo as a workspace you can refer to it as @dbx_build_tools//go/src/dropbox/build_tools/protoc-gen-mypy
, hope that helps!
from mypy-protobuf.
Related Issues (20)
- enums: argument has incompatible type "int"; expected "ValueType" HOT 2
- Compare mypy-protobuf to protobuf --pyi_out support (starting with 3.20) HOT 7
- Use official style for generated stubs HOT 5
- Reserve extension numbers within the protobuf global extension registry
- flake8-noqa reports unused `noqa` comments in generated protobuf stubs HOT 3
- Library stubs not installed for "google.protobuf.service_reflection" HOT 4
- my-protobuf-3.4.0 breaks backward compatibility by silently upgrading to protobuf-4 HOT 10
- Add version to header comment. HOT 3
- No module named mypy_protobuf HOT 8
- Not generating .py files from protouf file using this plugin HOT 1
- Question: why not use Pythonโs Enum HOT 11
- Get generated code to be black-compatible for readability
- Compatibility with flake8-pyi>=23.5.0 HOT 1
- timeout should be float HOT 2
- Release version on pypi is to low! HOT 2
- A better way to annotation the AsyncStub HOT 9
- Document the experience on configuring properly with Visual Studio Code HOT 1
- Fix github actions warnings
- Add error code to bare type ignore
- Ignoring field names equal to reserved keywords like "from" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mypy-protobuf.