multiformats / multihash

Self describing hashes - for future proofing
https://multiformats.io/multihash/
MIT License
894 stars 114 forks source link

jvm based multihash implementations should coordinate namespaces #98

Open lanzafame opened 6 years ago

lanzafame commented 6 years ago

I just noticed that the java implementation has the namespace io.ipfs.multihash and the kotlin implementation has io.ipfs.multiformats.multihash.

Ideally, all jvm multiformats implementations would live in peace and harmony and fall under the same namespace, i.e. io.ipfs.multiformats, and then be distinguished by language and project, i.e java-multihash, kt-multihash, clj-multihash etc. This may only be realistic for implementations that get brought into the multiformats github org.

lanzafame commented 6 years ago

@Stebalien @ianopolous @changjiashuai @tdiesler Seeing as this issue is floating around a bit, I understand not everyone uses Maven but it is still a major component of the ecosystem it would be great to sort this out. This issue applies to more than just multihash but it is here as I noticed it here first :). Would love to here peoples thoughts?

Stebalien commented 6 years ago

I don't really see any way forward here that'll make everyone happy but I'd use the language names (e.g., rename the kotlin one to io.ipfs.multiformats.multihash.kt). I just wish there were some language namespace switching concept in the JVM.

tdiesler commented 6 years ago

An obvious solution would be to move away from JitPack and publish on Maven central (like most other OS Java projects do). AFAICS, it is JitPack that mandates a certain group/artifactId for stuff that it publishes.

Moving to Maven central would give full control over group/artifactId and of course package name.

ianopolous commented 6 years ago

The JVM can easily handle loading things with the same package and even class name, using different class loaders. I suspect once we migrate to Java 9+ this will be a non problem because each implementation would have a distinct module.