graphprotocol / graphprotocol/graph-node

Stop generating Protobuf Rust bindings on `build.rs`

Aperta
#4,305 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

area/substreams firehose Stale
Lingua principale
Rust
Stelle
3.2k
Fork
1.1k
Merge medio
4g 1h
PR unite (30g)
1

Descrizione

Do you want to request a feature or report a bug?

Feature

What is the current behavior?

Right now, Protobuf Rust bindings are generated via build.rs in the Cargo build pipeline. However, the Protobuf definitions are updated quite infrequently. The current build process imposes some constraints on people that want to build graph-node as they require the full toolchain to compile Protobuf to Rust so valid protoc, seems that rustfmt was required also. Lot's of issue recently (like #4240) were having problem building due to incorrect protoc version.

What is the expected behavior?

Protobuf Rust bindings generation should be an ad-hoc task that is done manually by the developer when the Protobuf definition changes. This way, only then the toolchain is required and everyone else don't need to care about this.

Some ideas (could be "mixed" together):

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia ispezionando il build.rs esistente e la pipeline di build di Cargo che generano i binding Rust di Protobuf. Confronta gli approcci proposti, manuali, basati su script o su un task dedicato, quindi definisci come rigenerare i binding quando cambiano le definizioni e verifica che le build normali di graph-node non richiedano più la toolchain Protobuf.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.