question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Context in its own package?

See original GitHub issue

Although io.grpc.Context is shipped in its own artifact, and non-gRPC users can also depend on it, the package name still causes branding issue (google/instrumentation-java/issues/162), and a practical issue with OSGI (#2727). We may consider moving it into its own package and splitting it completely from gRPC.

We have two questions to answer:

  1. What should the new package name be? Probably something starting with com.google, but probably not com.google.common.context because it collides with a Google’s proprietary context class.
  2. How to bridge the old Context and Deadline to the new ones.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:1
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
codefromthecryptcommented, Mar 30, 2017

Could be a non-company’specific package name similar to dagger which just uses one word iirc. Short package helps as you can fully qualify the class easily in adapters

On 30 Mar 2017 08:02, “Bogdan Drutu” notifications@github.com wrote:

We can put it under com.google.instrumentation.context (but again it may not be generic enough and probably the name is too long). Can we put it in com.google.context or com.google.base?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/grpc/grpc-java/issues/2847#issuecomment-290262409, or mute the thread https://github.com/notifications/unsubscribe-auth/AAD613167xYd09n-xX3Rd_yj7o2T7Himks5rqvD9gaJpZM4MleqG .

0reactions
aseoviccommented, Oct 3, 2017

As I mentioned in #3522, it definitely feels like something like this should already be a part of JDK, but unfortunately it isn’t. Based on the discussion above, com.google.context does seem to make most sense.

The bottom line is that it certainly doesn’t feel like it belongs to io.grpc namespace (or project), considering that it has nothing to do with gRPC itself, and that both instrumentation-api and opencensus-api depend on it (which creates a really strange dependency graph, considering that grpc-core depends on both of those).

Read more comments on GitHub >

github_iconTop Results From Across the Web

context - Go Packages
Package context defines the Context type, which carries deadlines, cancellation signals, and other request-scoped values across API boundaries and between ...
Read more >
How to consume same React context coming from different ...
In ui-lib there is an export const context = React.createContext({..}) and in package A and in common it will be different instances of...
Read more >
Understanding golang's context package | Level Up Coding
The entry point for the contexts in golang is the context package. It is extremely useful and probably one of the most versatile...
Read more >
How To Use Contexts in Go - DigitalOcean
Many functions in Go use the context package to gather additional information about the environment they're being executed in, and will ...
Read more >
Go : Introduction to Context Package - Dev Genius
It's means, when you are create a context you can create a child context from the existing context. Parent context is possible to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found