eclipse / kuksa.val

kuksa.val
Apache License 2.0
89 stars 52 forks source link

Remove `optional` from kuksa.val.v1 proto #690

Open argerus opened 8 months ago

argerus commented 8 months ago

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.

erikbosch commented 3 months ago

Reopening all PRs closed by accident by boschglobal maintenance

erikbosch commented 2 months ago

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