grpc / grpc/grpc-java

Provide Prebuilt binaries for the java grpc protc plugin

Aperta
#10,509 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Java
Stelle
12.1k
Fork
4k
Merge medio
2g 17h
PR unite (30g)
37

Descrizione

### Is your feature request related to a problem?

When using `bazel` to build proto files into `java`, this library currently requires building the plugin from the source. This usually works well but some systems, mostly OSX don't have a good way to ensure you have a hermetic cpp compiler. I've seen issues where given the setup or version of the OS and the local compiler can cause problems. This can get exacerbated by having other dependencies in a project that depend on other versions of CPP. Some things need `c++14` and other `c++17`.

### Describe the solution you'd like

If this repo could publish a pre-built binary for each OS and architecture on release then the consumers could pull that down instead of having to ensure their tool chain is configured correctly to build from source. e.g

```
# Use a pre-built if we have it other wise fall back to compiling from source.
alias(
name = "grpc_java_plugin",
visibility = ["//visibility:public"],
actual = select({
"@bazel_tools//src/conditions:darwin_x86_64": "@grpc_java_plugin_darwin_amd64//:java_plugin",
"@bazel_tools//src/conditions:linux_x86_64": "@grpc_java_plugin_linux_amd64//:java_plugin",
"//conditions:default": ":grpc_java_plugin_bin"
}),
)
```

Fall back to building from source if there isn't an applicable version published on release so you could only target the major versions if storage on Github is a concern.

This is how `rules_proto` is currently providing `protoc` and this system works very well.

In addition, it's very easy to cause the cache to break when building from a source which causes a lot of unneeded rebuilds.

### Additional context

One way to roll this out is to put this behind a config and only use prebuilts when that flag is on. So consumer would have to opt in until it seems stable and then can be put on by default.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia esaminando la configurazione Bazel attuale che compila il plugin protoc gRPC per Java e il processo di release che pubblicherebbe gli artefatti. Confronta il comportamento di fallback e opt-in proposto con l’approccio rules_proto descritto nell’issue. Il lavoro è completo quando vengono pubblicati binari per i sistemi operativi e le architetture supportati e i consumer possono selezionarli, mantenendo al contempo un fallback alla compilazione dal codice sorgente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
build-system, release
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.