Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

feat: export package version#866

Open
alexander-fenster wants to merge1 commit intogrpc:master
base:master
Choose a base branch
Loading
fromalexander-fenster:export-version
Open

feat: export package version#866

alexander-fenster wants to merge1 commit intogrpc:masterfromalexander-fenster:export-version

Conversation

alexander-fenster
Copy link
Contributor

Since we are entering a phase when different client libraries will use different gRPC implementations (most will be migrated to@grpc/grpc-js but some will still stay withgrpc), we'd like to have an easy way for the client library to set the gRPC version in the headers without actually knowing if thegrpc instance they work with is a C-core or JS implementation.

Can we have thisgrpc.version added to both implementations to make this tracking easier? (or feel free to suggest another options!)

@murgatroid99
Copy link
Member

First, both libraries put some variant of this information in theuser-agent header, or at least they're supposed to. Does that resolve your problem of wanting that information in a header?

Second, library users can already dorequire('grpc/package.json') orrequire('@grpc/grpc-js/package.json') and then format the information from that however they want.

@alexander-fenster
Copy link
ContributorAuthor

Libraries usegrpc/${version} header.@JustinBeckwith can know more about tracking and ifuser-agent header is sufficient. Justin, do you know if can we go withuser-agent and not setgrpc at all?

As for the second item, it won't be possible since the gax code can accept anygrpc instance from the caller and it does not know if it's one or another implementation.

@murgatroid99
Copy link
Member

If the currentuser-agent behavior does not solve your problem, this change needs to go through ourAPI design review process because it is a (non-breaking) API change.

@murgatroid99
Copy link
Member

I don't think it's a good idea to export this information pre-formatted for a specific use-case. I would prefer to either export the wholepackage.json as a single object or exportname andversion verbatim.

@alexander-fenster
Copy link
ContributorAuthor

I'm totally fine with either of those options - I just wanted to have the conversation started :)

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@alexander-fenster@murgatroid99

[8]ページ先頭

©2009-2025 Movatter.jp