ipfs/go-dnslink

Convert to a wrapper around modern dnslink-std/go

martinheidegger opened this issue ยท 8 comments

๐Ÿ‘‹ As part of the grant I am working on I have been preparing a thorough test suite for dnslink to make sure that different dnslink implementations work the same way. I am currently planning to send a PR to this repository that makes it compatible. As part of this process I have been wondering if this repository shouldn't be moved to the dnslink-std organization?

Note: I invited @jbenet as organization owner. (cc. @lidel)

lidel commented

iirc moving go package is extra tricky due to the way imports work in golang (based on URL).

@aschmahmann do you know if we did this before? Any traps to watch out for?

I believe that github redirects renames. An alternative would be to make this repository a shallow wrapper for dnslink-std/go

Is the idea that we'd like this package to be imported in the future as github.com/dnslink-std/go-dnslink?

If so then IIUC GitHub redirects won't be enough since the go.mod file declares the import path of the module and so changing in the new repo would break existing users.

Probably the "most correct" and least breaking thing you could do is transfer the repo to the new org and then create a repo here that wraps the other one while marking all exports as deprecated and then archiving it. This would allow you to support the old import paths, the new import paths, keep the GitHub history (e.g. issues) associated with the new repo, and encourage people to switch their dependencies.

However, I'm not sure who is depending on this repo, so it might be that just doing the transfer is fine ๐Ÿคท.

Probably the "most correct" and least breaking thing you could do is transfer the repo to the new org and then create a repo here that wraps the other one while marking all exports as deprecated and then archiving it.

๐Ÿ‘

However, I'm not sure who is depending on this repo, so it might be that just doing the transfer is fine ๐Ÿคท.

Playing it safe seems better to me.

lidel commented

@marten-seemann if you prepare the "wrapper" repo somewhere, I can do the moving (move this one to dnslink-std and your wrapper in its place)

However, I'm not sure who is depending on this repo, so it might be that just doing the transfer is fine ๐Ÿคท.

Looks like there's only one project depending on this: https://github.com/search?q=ipfs%2Fgo-dnslink. Given that, creating a wrapper seems like overkill to me, as long as we ping https://github.com/natewalck/go-ipfs-dnslink (or maybe even better, send them a PR).

lidel commented

@marten-seemann oops, I meant @martinheidegger (ugh, autocomplete) but โค๏ธ for checking ๐Ÿ™

I also found https://github.com/paulgmiller/zebu/blob/main/backend.go, but that's about it.
My only worry is private code that we don't see, so let's do the wrapper that prints deprecation warning urging people to migrate.

@martinheidegger I'm parking this for now, lmk when you have time to prepare a "wrapper" just in case, I'll do the moving.