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

Remove optional from kuksa.val.v1 proto #690

Closed

Conversation

argerus
Copy link
Contributor

@argerus argerus commented Oct 23, 2023

Alternative implementation that remains wire-protocol compatible.
Turns out it's actually source compatible when using python, which is good.

Example of the "clunkyness" of using it in Rust (and probably C++).

-    metadata.description = Some(description);

+    metadata.optional_description = Some(
+        proto::metadata::OptionalDescription::Description(description)
+    );
-    if let Some(description) = metadata.description {
-        // Do things
-    }

+    if let Some(OptionalDescription::Description(description)) =
+        metadata.optional_description
+    {
+        // Do things
+    }

Not great, not terrible.

And technically, those who want use optional can just use an alternative .proto, as it's all compatible on the wire anyway.

@boschglobal boschglobal closed this by deleting the head repository Mar 21, 2024
@erikbosch
Copy link
Contributor

Reopening all PRs closed by accident by boschglobal maintenance

@erikbosch erikbosch reopened this Mar 21, 2024
@erikbosch
Copy link
Contributor

Databroker has been migrated to https://github.com/eclipse-kuksa/kuksa-databroker.
Please open a new pull request in that repo.

@erikbosch erikbosch closed this Oct 9, 2024
@erikbosch erikbosch deleted the feature/remove_proto_optional2 branch October 31, 2024 13:13
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