akka/akka-core

Protobuf files conflict due to version mismatch

Open

#29,456 opened on Aug 4, 2020

View on GitHub
 (4 comments) (0 reactions) (0 assignees)Scala (3,547 forks)batch import
1 - triagedhelp wantedt:serialization

Repository metrics

Stars
 (13,277 stars)
PR merge metrics
 (Avg merge 8d 19h) (10 merged PRs in 30d)

Description

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

Contributor guide