Last active
February 25, 2025 16:11
-
-
Save wchargin/fac7e3bad80babdd2f1099c4fbc4c6aa to your computer and use it in GitHub Desktop.
protobuf.dart#952 reproducer #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
message A {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
message B {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
import "a.proto"; | |
message HasA { | |
A a = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
import "a.proto"; | |
import "b.proto"; | |
message HasAB { | |
A a = 1; | |
B b = 2; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
import "b.proto"; | |
message HasB { | |
B b = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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