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

Make client name field public #472

Merged
merged 2 commits into from
Feb 24, 2025

Conversation

micheal-parks
Copy link
Member

Overview

It's often useful to read the corresponding resource name from a client, for example when executing requests on the robotClient in a scope where only a resource client and not the original resource name is available. In this PR I've switched all names to public but kept the readonly modifier.

@micheal-parks micheal-parks requested a review from a team as a code owner February 18, 2025 19:59
Copy link
Member

@zaporter-work zaporter-work left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm in favor of this change -- svelte-sdk has to pair clients and their names together. If this info was on the client, it would simplify our code.

Are there any downsides to this?

@micheal-parks
Copy link
Member Author

micheal-parks commented Feb 18, 2025

I don't see any. It's still readonly, and the user knows the name of the client when passing it to the constructor. This is useful metadata that should be made available IMO. In non-ts-land people can already read (and change) this value since all modifiers are compiled away.

Copy link
Member

@stuqdog stuqdog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable to me!

@micheal-parks micheal-parks merged commit 889d5d7 into viamrobotics:main Feb 24, 2025
3 checks passed
@micheal-parks micheal-parks deleted the make-name-public branch February 24, 2025 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants