Giter VIP home page Giter VIP logo

Comments (4)

dmitshur avatar dmitshur commented on July 28, 2024 1

Until that issue is resolved, I'll just note that the github.com/shurcooL/go/ctxhttp package is very simple conceptually. Its source is 100% identical to golang.org/x/net/context/ctxhttp, except the pre-1.7 support is dropped and "golang.org/x/net/context" import is replaced with "context".

Compare for yourself:

from graphql.

dmitshur avatar dmitshur commented on July 28, 2024

Hi Glenn,

Thanks for checking in on this. To be clear, the ctxhttp package comment says:

It's a copy of "golang.org/x/net/context/ctxhttp" with pre-1.7 support dropped, and "golang.org/x/net/context" import replaced with "context". It exists temporarily until "golang.org/x/net/context/ctxhttp" is updated, which will happen "in a couple releases" according to https://golang.org/cl/24620.

Specifically, it exists until golang.org/x/net/context/ctxhttp is updated to use context instead of the obsolete golang.org/x/net/context. It is not waiting on CL 24620 to be merged—that happened a long time ago. I referenced that CL because its the source of information that the golang.org/x/net/context/ctxhttp update to use context will happen "in a couple releases".

Perhaps I should've been more specific there and pointed to the message itself:

https://go-review.googlesource.com/c/24620#message-a0eec577b9152b699a15e9c50c8615654fb3191b

That hasn't happened yet, so I can't quite do this. Otherwise, it would result in both context and golang.org/x/net/context packages being imported (indirectly), which would be suboptimal.

Now that Go 1.9 final is almost released, perhaps it's very soon that golang.org/x/net/context/ctxhttp can be updated and my copy will no longer need to exist.

from graphql.

dmitshur avatar dmitshur commented on July 28, 2024

I've filed golang/go#21358 to find out what the status of the upstream ctxhttp is, and when it can be updated to use the modern context import.

from graphql.

dmitshur avatar dmitshur commented on July 28, 2024

Issue golang/go#21358 has been resolved today, so I can finally resolve this issue! 🎉 /cc @gmlewis @bradfitz

from graphql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.