Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move to requiring go1.7 #3093

Closed
2 tasks
whyrusleeping opened this issue Aug 17, 2016 · 5 comments
Closed
2 tasks

Move to requiring go1.7 #3093

whyrusleeping opened this issue Aug 17, 2016 · 5 comments
Labels
need/community-input Needs input from the wider community

Comments

@whyrusleeping
Copy link
Member

whyrusleeping commented Aug 17, 2016

go1.7 brings many awesome improvements that we benefit greatly from.

Some highlights:

at least 10% (up to 35%) performance improvement in crypto/sha256 and math/big

These are hard cpu bottlenecks in various aspects of ipfs. Improving these will make ipfs feel faster all over (especially during ipfs add on faster disks). It will also make ipfs use less cpu in general.

context adopted into stdlib

the context is a very core component to how we write good concurrent code. Having this in the standard library will clean up our dependency tree quite a bit, as well as making it easier to write better concurrent code all around. Our dependencies will also be more likely to integrate contexts into their code (looking at you yamux!).

net.DialContext

This one is huge. We currently have lots of issues down the network stack with different blocking calls not respecting contexts, it leads to things not feeling very responsive, and consuming wayyy more resources than they need to. In this particular instance, for dialing, we make N (around 10) concurrent outbound dials per peer we try to connect to, one for each address we know they might be reachable at. If we dial an incorrect address, the only way currently to end that is to wait for the timeout. Even if another dial succeeds, that dial has to block until it times out, holding open a file descriptor all the while. Having that call respect contexts will greatly improve our file descriptor consumption.

So what do we need to do?

Using the context changes will be backwards incompatible with previous versions of go. When we decide to implement these, anyone wanting to compile ipfs from source will have to use go1.7

Since we provide pre-built binaries, i think its acceptable to quickly set this as a build requirement. What do you all think?

Relevant PRs:

@whyrusleeping whyrusleeping added the need/community-input Needs input from the wider community label Aug 17, 2016
@whyrusleeping
Copy link
Member Author

Also worth noting, in order to support macOS Sierra, we need to use go1.7

@Kubuxu
Copy link
Member

Kubuxu commented Aug 17, 2016

I am all for it, but we should then publish dev releases to dist page periodically, as some systems will take few weeks or months to adopt 1.7 compiler.

@jbenet
Copy link
Member

jbenet commented Aug 18, 2016

  • it's fine to bump our req to 1.7
  • we should strongly consider using gx to install the version of Go we need
    locally. Can use their prebuilts directly. That way we can upgrade without
    waiting for people to upgrade their whole systems.
  • most users SHOULD NOT be building from source anyway, nor expecting to
    use edge dev, they SHOULD be using releases.
    On Wed, Aug 17, 2016 at 12:15 Jakub Sztandera [email protected]
    wrote:

I am all for it, but we should then publish dev releases to dist page
periodically, as some systems will take few weeks or months to adopt 1.7
compiler.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3093 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIcoViP1yI6BrVOE3_dZYLIVlY-0vUaks5qgzOZgaJpZM4JmENv
.

@jbenet
Copy link
Member

jbenet commented Aug 18, 2016

Also much ❤️❤️❤️❤️❤️❤️❤️❤️ to net with context :)
On Wed, Aug 17, 2016 at 23:16 Juan Benet [email protected] wrote:

  • it's fine to bump our req to 1.7
  • we should strongly consider using gx to install the version of Go we
    need locally. Can use their prebuilts directly. That way we can upgrade
    without waiting for people to upgrade their whole systems.
  • most users SHOULD NOT be building from source anyway, nor expecting to
    use edge dev, they SHOULD be using releases.
    On Wed, Aug 17, 2016 at 12:15 Jakub Sztandera [email protected]
    wrote:

I am all for it, but we should then publish dev releases to dist page
periodically, as some systems will take few weeks or months to adopt 1.7
compiler.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#3093 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIcoViP1yI6BrVOE3_dZYLIVlY-0vUaks5qgzOZgaJpZM4JmENv
.

@whyrusleeping
Copy link
Member Author

go1.7 is now required for building master of ipfs. We can close this now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/community-input Needs input from the wider community
Projects
None yet
Development

No branches or pull requests

3 participants