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

Enums in grpc-labview don't support the "=" or ";" characters #332

Open
pbirkhol-ni opened this issue Dec 8, 2023 · 0 comments
Open

Enums in grpc-labview don't support the "=" or ";" characters #332

pbirkhol-ni opened this issue Dec 8, 2023 · 0 comments

Comments

@pbirkhol-ni
Copy link
Contributor

pbirkhol-ni commented Dec 8, 2023

grpc-labview's intermediate representation of enum key/value pairs is as follows:

string1=value1;string2=value2;string3=values3

This means that adding an = or ; to your enum string will cause grpc-labview to either corrupt memory or crash. This has been an issue for MeasurementLink because we can't control what our customers add to their enums. If their enums have a = or ; and we call Register Enum Metadata.vi, bad things will happen.

To workaround this issue, MeasurementLink is checking the enum strings before calling Register Enum Metadata.vi and throwing a helpful error if the enum contains an invalid character. However, grpc-labview should really consider using a standard format for the intermediate representation rather than inventing their own. For example, json wouldn't have such restrictions.

I realize that various grpc style guides prohibit special characters like ; and =. This bug is more about recommending that you don't invent your own tokenization code and instead use an industry standard.

AB#2599407

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

No branches or pull requests

1 participant