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

Use rust-protobuf instead of prost #23

Conversation

sophokles73
Copy link
Contributor

The library now uses the rust-protobuf crate instead
of prost to generate structs from the uProtocol proto files.

All of the library's code has been adapted to the changed API
while trying to maintain the library's existing external behavior.

Copy link

@stevenhartley stevenhartley left a comment

Choose a reason for hiding this comment

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

Please update to pull in 1.5.5 of core-api, other than that I have no issue

build.rs Outdated
fn main() -> std::io::Result<()> {
// use vendored protoc instead of relying on user provided protobuf installation
std::env::set_var("PROTOC", protoc_bin_vendored::protoc_bin_path().unwrap());
const UPROTOCOL_BASE_URI: &str = "https://raw.githubusercontent.com/eclipse-uprotocol/uprotocol-core-api/uprotocol-core-api-1.5.4/uprotocol";

Choose a reason for hiding this comment

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

@sophokles73 please pull 1.5.5, I added a fix for uAuthority

@@ -16,7 +16,7 @@ use std::convert::Into;
use std::sync::atomic::{AtomicU64, Ordering};
use std::time::{SystemTime, UNIX_EPOCH};

use crate::uprotocol::Uuid as uproto_Uuid;
use crate::uprotocol::uuid::UUID as uproto_Uuid;
Copy link
Contributor

Choose a reason for hiding this comment

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

One thing I thought of here... looking to hear your thoughts. I don't know what the convention is, but if I'm looking for impls of UUid or its usage within this crate, I think it makes it a little harder to find due to this use foo as bar.

WDYT? Other than that, I'm good with the changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed the alias in the latest commit I have pushed ...

Copy link
Contributor

@PLeVasseur PLeVasseur left a comment

Choose a reason for hiding this comment

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

LGTM

@sophokles73
Copy link
Contributor Author

@stevenhartley I have upgraded to uProtocol 1.5.5 now ...

@stevenhartley
Copy link

@sophokles73 could you check this PR? I might have broke it while trying to merge.

@sophokles73
Copy link
Contributor Author

@stevenhartley no problem, I will rebase and squash my branch. I recommend that you do not use merge commits when merging a PR but use rebasing instead. This will provide for a much cleaner and easier to follow commit log.

The library now uses the rust-protobuf crate instead
of prost to generate structs from the uProtocol proto files.

All of the library's code has been adapted to the changed API
while trying to maintain the library's existing external behavior.

The library has also been updated to use the uProtocol 1.5.5 API.
Re-exported all public API structs from uprotocol module so that
client code does not need to know about the (internal) structure
of the code generated by rust-protobuf.
@stevenhartley stevenhartley merged commit 06318da into eclipse-uprotocol:main Jan 25, 2024
3 checks passed
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