Skip to content

Instantly share code, notes, and snippets.

@wchargin
Last active February 25, 2025 16:11
Show Gist options
  • Save wchargin/fac7e3bad80babdd2f1099c4fbc4c6aa to your computer and use it in GitHub Desktop.
Save wchargin/fac7e3bad80babdd2f1099c4fbc4c6aa to your computer and use it in GitHub Desktop.
protobuf.dart#952 reproducer #1
syntax = "proto3";
message A {}
syntax = "proto3";
message B {}
FROM dart:3.7.0-sdk
RUN apt-get update
RUN apt-get install -y protobuf-compiler libprotobuf-dev
RUN dart pub global activate protoc_plugin
syntax = "proto3";
import "a.proto";
message HasA {
A a = 1;
}
syntax = "proto3";
import "a.proto";
import "b.proto";
message HasAB {
A a = 1;
B b = 2;
}
syntax = "proto3";
import "b.proto";
message HasB {
B b = 1;
}
#!/bin/sh
set -eu
dart --version
dart pub global list
protoc --version
printf '\n'
rm -rf out_ab out_ba
mkdir out_ab out_ba
protoc -I/src --dart_out=out_ab /src/has_a.proto /src/has_b.proto /src/has_ab.proto
protoc -I/src --dart_out=out_ba /src/has_b.proto /src/has_a.proto /src/has_ab.proto
diff -u out_ab/has_ab.pb.dart out_ba/has_ab.pb.dart
#!/bin/sh
set -eu
image=dart-protobuf-952
docker build -t "${image}" .
docker run --rm -v "$PWD:/src:ro" "${image}" /src/repro.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment