multihash icon indicating copy to clipboard operation
multihash copied to clipboard

jvm based multihash implementations should coordinate namespaces

Open lanzafame opened this issue 5 years ago • 4 comments

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 avatar Jul 23 '18 08:07 lanzafame

@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?

lanzafame avatar Aug 06 '18 04:08 lanzafame

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.

Stebalien avatar Aug 07 '18 18:08 Stebalien

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.

tdiesler avatar Aug 08 '18 09:08 tdiesler

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.

ianopolous avatar Aug 08 '18 19:08 ianopolous