ipfs / go-cid

Content ID v1 implemented in go
MIT License
156 stars 47 forks source link

Revert #142 #145

Closed Jorropo closed 2 years ago

Jorropo commented 2 years ago

Revert #142 Fixes #144

@Jorropo @rvagg If you reallly want to keep CodecToStr and Codecs, you should make sure they return hard error when someone tries to use them for impacted mappings above. Third-party people use this library. People don't read release notes. Silent data corruption is not acceptable.

I don't think this is doable other than removing CodecToStr.

An other solution is patching go-cid's map to present the old behaviour.

github-actions[bot] commented 2 years ago

Suggested version: v0.3.2 Comparing to: v0.3.1 (diff)

Changes in go.mod file(s):

diff --git a/go.mod b/go.mod
index 8731e34..44e2a51 100644
--- a/go.mod
+++ b/go.mod
@@ -2,7 +2,6 @@ module github.com/ipfs/go-cid

 require (
    github.com/multiformats/go-multibase v0.0.3
-   github.com/multiformats/go-multicodec v0.5.0
    github.com/multiformats/go-multihash v0.0.15
    github.com/multiformats/go-varint v0.0.6
 )

gorelease says:

# github.com/ipfs/go-cid
## incompatible changes
CodecToStr: removed
Codecs: removed

# summary
Suggested version: v0.4.0

gocompat says:

(empty)
Jorropo commented 2 years ago

I know this is a semver violation but no one used v0.3.1 already so it's fine.

Jorropo commented 2 years ago

For kubo Ill have to fix something to use go multicodec but that fine.