ipfs-shipyard / java-ipfs-http-client

A Java implementation of the HTTP IPFS API
MIT License
538 stars 243 forks source link

feat: support go-ipfs 0.5 and Java 10+ #164

Closed lidel closed 4 years ago

lidel commented 4 years ago

This PR supersedes https://github.com/ipfs-shipyard/java-ipfs-http-client/pull/160 https://github.com/ipfs-shipyard/java-ipfs-http-client/pull/159 and https://github.com/ipfs-shipyard/java-ipfs-http-client/pull/161

TODO

Tests do not pass, looks like there is no support for CIDv1/multibase:

lidel commented 4 years ago

@ianopolous my Java is rusty, would appreciate some guidance/tips on current best practices:

ianopolous commented 4 years ago

My view of source control in general is that I want to be able to check out any historical commit and be able to build it. If it relies on some external service to deliver assets (i.e. the dependencies aren't vendored) then that is not longer the case. But feel free to do what you want given I don't have time.

I've also fixed the base32 multibase issue in Peergos.

odisseus commented 4 years ago

Some of the tests are failing because the versions of dependency libraries are outdated.

$ mvn dependency:tree
# ...snip...
com.github.ipfs:java-ipfs-http-client:jar:v1.2.3
+- com.github.multiformats:java-multiaddr:jar:v1.3.1:compile
|  \- com.github.ipld:java-cid:jar:v1.1.0:compile
|     +- com.github.multiformats:java-multibase:jar:v1.0.0:compile
|     \- com.github.multiformats:java-multihash:jar:v1.1.0:compile
+- junit:junit:jar:4.12:test
\- org.hamcrest:hamcrest-core:jar:1.3:test

The latest release of java-multiaddr seems to be using an outdated version of java-cid, which in turn uses outdated version of java-multihash.

Also, java-cid needs to be rebuilt against the very latest version of java-multihash, because of a change in its interface that leads to binary incompatibility.

lidel commented 4 years ago

Superseded by https://github.com/ipfs-shipyard/java-ipfs-http-client/pull/170