stellar / go

Stellar's public monorepo of go code
https://stellar.org/developers
Apache License 2.0
1.29k stars 502 forks source link

migrate away from goautoneg, a soon-to-be deprecated dependency #2039

Closed drov0 closed 4 years ago

drov0 commented 4 years ago

https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket

tl;dr : Mercurial features and repositories will be officially removed from Bitbucket and its API on June 1, 2020.

goautoneg uses mercurial, and when support ends, the repo will be deleted. I suggest either making a git fork or migrating to another library.

ire-and-curses commented 4 years ago

We could move to this: https://github.com/adjust/goautoneg

It's not been updated in 5 years, but then the original in bitbucket hasn't been updated in 7.

@leighmcculloch what do you think?

leighmcculloch commented 4 years ago

It would be convenient to adopt proposal golang/go#19307 that will add some of this logic to the stdlib or the x packages.

It'd be okay to move to the adjust fork, but there would likely be no advantage over forking it ourselves given the authors haven't suggested they're going to maintain it and the adjust fork lost the original history.

I think we should fork the BitBucket version at least temporarily until the proposal has code behind it. I'd like to preserve the original history in the fork too, which we can do. If the proposal ends up being an x package we can start using it immediately without needing to wait for two Go releases to happen.

I'm participating in the proposal from here: https://github.com/golang/go/issues/19307#issuecomment-564702037.

I'm happy to take this on sometime, it is a small effort. Anyone else is welcome to take it though.

ire-and-curses commented 4 years ago

Preserving the history seems valuable. Forking ourselves seems straightforward until/if stdlib picks this up. I agree.

leighmcculloch commented 4 years ago

Process to import mercurial data into a git repo is here: https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git#_mercurial

drov0 commented 4 years ago

Is there anything I can do ? If I were to import it into a git repo and you just fork it (to have control over the code) would you use that as a dependency ?

leighmcculloch commented 4 years ago

This is one thing that will be simpler for us to do. The code review and verification we'll need to do means the effort to switching and importing the fork will be essentially the same, we'd be repeating your effort. Thanks for offering.

I've got this in my backlog but we've got sometime before this needs to be address given Mercurial on BitBucket isn't disappearing until June 2020.

@drov0 Is there anything else that'd drive needing to change this before that date that you know of?

drov0 commented 4 years ago

@leighmcculloch Well our CI is failing because we don't have mercurial installed in the image. But more important than that, people always take a long time to update dependencies, especially with golang so the sooner this change is made, the less likely people's build will fail in june.

leighmcculloch commented 4 years ago

@drov0 If you use the latest version of Go and modules, you shouldn't need Mercurial installed. Go 1.13 downloads modules dependencies from the Go Proxy instead of getting them from their source locations. This is how I avoid needing Mercurial installed.

That's a good point about getting ahead of this because people also need to update their dependencies. I'll prioritize this in the new year.

ayeowch commented 4 years ago

Bump. Looks like http://bitbucket.org/ww/goautoneg got removed today.

Shaptic commented 4 years ago

Fixed in #2952.

BRBussy commented 4 years ago

Fixed in #2952.

Hi everyone! Any idea on a timeline for when this dependency update will become available in a new horizonclient/txnbuild release? From what I can see this change is not yet available in the latest release of the client libraries. Please let me know if I am misunderstanding something and there is a way to use the latest client libraries release with the updated depenency.