akka/akka-core

Protobuf files conflict due to version mismatch

Aperta

#29.456 aperta il 4 ago 2020

 (4 commenti) (0 reazioni) (0 assegnatari)Scala (3547 fork)batch import
1 - triagedhelp wantedt:serialization

Metriche repository

Star
 (13.277 stelle)
Metriche merge PR
 (Merge medio 8g 19h) (10 PR mergiate in 30 g)

Descrizione

It seems like due to the shading of protobuf library users should be safe using different version of protobufs than the one bundled into akka. However protobuf comes already with some core proto definitions bundled into it which aren't being shaded as shading process transforms only classes. Because of that, when trying to assemblePackageDependency on a project, which includes both akka and some other version of protobufs(than akka uses internally), a conflict will occur if there is a mismatch between corresponding files' contents. An example of such conflict can be found here: https://github.com/EventStore/EventStore.JVM/issues/159

Content of the akka-protobuf-v3 jar:

tree --filelimit=12                               
.
├── akka
│   └── protobufv3
│       └── internal [660 entries exceeds filelimit, not opening dir]
├── google
│   └── protobuf
│       ├── any.proto
│       ├── api.proto
│       ├── compiler
│       │   └── plugin.proto
│       ├── descriptor.proto
│       ├── duration.proto
│       ├── empty.proto
│       ├── field_mask.proto
│       ├── source_context.proto
│       ├── struct.proto
│       ├── timestamp.proto
│       ├── type.proto
│       └── wrappers.proto
└── META-INF
    └── MANIFEST.MF

7 directories, 13 files

Guida contributor