Open jonasbadstuebner opened 6 months ago
protoc_plugin in https://github.com/google/protobuf.dart/commit/b7613581d847e1e36e76f0e36db3a412d8fea5b1 can only be compiled with the protobuf in the same commit (or later). Since we don't override the protobuf dependency to ../protobuf
(I don't even know if that's possible when running dart pub global activate ...
) it's trying to use the latest released protobuf library, which is not compatible.
Things to fix:
The commit forgot to bump protobuf dependency version. We should bump it to 4.0.0. After that the command will fail because 4.0.0 is not published yet.
If possible, override protobuf dependency to ../protobuf
when installing from the git repo, because that's the only way to make sure it will always work. However I'm not sure if this is possible.
Note that after the second step above your project may fail to compile unless you also use the protobuf library from the git repo with the same rev as the protoc_plugin.
By the way, it works on master.
Is there an ETA for 4.0.0, so I don't have to use a local repository?
dart pub global activate -sgit https://github.com/google/protobuf.dart.git --git-path protoc_plugin/
gives me the following error:ref is b7613581d847e1e36e76f0e36db3a412d8fea5b1
dart pub global activate -sgit https://github.com/google/protobuf.dart.git --git-path protoc_plugin --git-ref 1822b81df565f7b7d54450b33fa2c997f69a9995
works as expected, so the problem is somewhere in b7613581d847e1e36e76f0e36db3a412d8fea5b1Am I missing something or is this a newly introduced problem?