Comments (9)
I am a huge fan of this and will try to work on it in early April unless someone gets to it earlier.
Cc @linzhp
from rules_go.
@fmeum note the rules_python change just landed, and @thesayyn tells me rules_java is already switched. Would be nice to include rules_go in this when rules_proto 6.0.0 final goes out (it's currently RC2)
from rules_go.
@thesayyn I tried using rules_java with --incompatible_enable_proto_toolchain_resolution
, but it fails to find a proto_lang_toolchain
for Java even with Bazel@HEAD. Do you know what's needed to get this to work?
from rules_go.
Toolchain for java comes from protobuf repo, that's only one we i know of unless @alexeagle added one in his prebuilt toolchains ruleset.
from rules_go.
Right, the flag decouples from the hardcoded toolchain but doesn't automatically supply a replacement. It should be easy to fetch the runtime from Maven exactly like the protobuf docs instruct all non-Bazel users/tools should do. I'll add to the toolchains_protoc
from rules_go.
correction, https://github.com/bazelbuild/examples/blob/never_compile_protoc_again/proto/java/Main.java already shows how this works for Java.
from rules_go.
Is there an example of using this with rules_go
?
from rules_go.
Is there an example of using this with
rules_go
?
You don't need to do anything extra for rules_go
, just flip the flag and have a protoc
toolchain registered (e.g. from toolchains_protoc
). rules_go
doesn't use proto_lang_toolchain
, so you also don't have to register one.
from rules_go.
Adding the example here: aspect-build/toolchains_protoc#10
(but it's trivial like @fmeum says, no additional toolchain to register)
from rules_go.
Related Issues (20)
- gc_goopts seems buggy or has unexpected behavior
- Unable to get io_bazel_rules_go to work with a custom c++ toolchain HOT 1
- Rules_go 0.47.0 downgraded the gomock dependency from 1.7.0-rc1 to 1.6.0, which broke support for generics in mocks HOT 1
- How to test an analysis.Analyzer?
- Differentiate compile actions under go_test
- `GoLink` for Gazelle fails on Go 1.20 or greater HOT 2
- goleak broken by recent timeout changes
- How do I depend on the "bazel" package of rules_go when using MODULE.bazel HOT 3
- [BAZEL CI] rules_go cgo:opts_test is failing with Bazel@HEAD HOT 1
- go_tool_binary / GoToolchainBinaryBuild actions don't always run on the correct platform
- GoStdlib, GoCompilePkg, etc. don't respect exec_compatible_with of the underlying C/C++ toolchain HOT 1
- Calls to https://go.dev/dl/?mode=json are breaking airgapped builds - provide way to avoid these HOT 6
- rules_go + protobufs + experimental_sibling_repository_layout fails to build HOT 2
- How do you use protoc with 0.48.0? HOT 4
- Proposal: Fail protoc code gen on missing expected output files
- Embedding native buildinfo in Bazel binaries
- go_proto_library: Issue/New Feature for output path generation.
- How to create go_proto_library automatically HOT 1
- rules_go 0.48.0 inconsistent strict deps behavior between bzlmod enabled and disabled HOT 2
- Cross-compilation to Linux on MacOS sets CGO_ENABLED=0 even though cgo=True in go_library and platform set to linux_amd64_cgo HOT 3
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 rules_go.