-
Notifications
You must be signed in to change notification settings - Fork 38
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
[#18] Adds formatting for services and an additional example #44
[#18] Adds formatting for services and an additional example #44
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the contribution 😄
Could you please adjust the commit messages and add [#29]
as prefix to every commit message.
You can do this by calling git rebase -i HEAD~3
, set the commit in editor from pick
to edit
, adjust the comment with git commit --amend
and then call git rebase --continue
.
This you can then push with git push -f
.
When this is done and the comments are addressed we can merge this thing.
And welcome to the team, you are our first external contributor!
daa648a
to
4f2f242
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Could you please also add the Display
implementation to the port factory of the publish subscribe messaging pattern in src/service/port_factory/publish_subscribe.rs
.
@@ -127,3 +130,53 @@ impl<'config, Service: service::Details<'config>> PortFactory<'config, Service> | |||
PortFactoryListener { factory: self } | |||
} | |||
} | |||
|
|||
impl<'config> fmt::Display for PortFactory<'config, zero_copy::Service<'config>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better to introduce the second generic parameter here: Service: service::Details<'config>
and then replace the line f.debug_struct("zero_copy::Service")
(136) with
f.debug_struct(format!("{}", core::any::type_name::<Service>()))
With this we reduce the code duplication and when we introduce another service variant we do not have to add here a third version (which may is even forgotten).
@hydroid7 What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, core::any::type_name
is a game changer here! 🎉
} | ||
} | ||
|
||
impl<'config> fmt::Display for PortFactory<'config, process_local::Service<'config>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hydroid7 If you follow my suggestion from above we can remove this here.
@hydroid7 could you please also add this into the The entry would look somehow like this:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #44 +/- ##
==========================================
+ Coverage 77.97% 78.14% +0.16%
==========================================
Files 172 172
Lines 18729 18803 +74
==========================================
+ Hits 14604 14693 +89
+ Misses 4125 4110 -15
|
I did not review the patch but please don't forget why this is done. We want to replace the custom printing code in these to locations
Pleas change those examples to just use Oh, and the PR and commit messages use the wrong issue number. It's actually #18. #29 was the previous PR. |
4f38d29
to
dafac37
Compare
Thank you all for the constructive comments, I rewrote the commit messages, added the feature to the releasenotes, changed the documentation in order to reflect the new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only had a look at the release notes. I'll leave the actual code to @elfenpiff
@@ -6,7 +6,7 @@ | |||
|
|||
### Features | |||
|
|||
* Example [#1](https://github.com/larry-robotics/iceoryx2/issues/1) | |||
* Add `Display` implementation for `PortFactory` [#29](https://github.com/eclipse-iceoryx/iceoryx2/issues/18) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Add `Display` implementation for `PortFactory` [#29](https://github.com/eclipse-iceoryx/iceoryx2/issues/18) | |
* Add `Display` implementation for `PortFactory` [#18](https://github.com/eclipse-iceoryx/iceoryx2/issues/18) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, as soon as the issue number in the release notes is corrected we can merge this.
Sorry that these took that long, but here they are. Background for my contributions is that I'm writing a DDS middleware / message broker as my MSc Thesis. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add [#18]
here, similar to the other PR.
3f57c5c
to
b7f49c1
Compare
@hydroid7 you need to fix the clippy warnings to make the CI happy |
@hydroid7 do you plan to finish this PR in the near future? |
I think the PR is abandoned for now. @hydroid7 if you would like to continue working on this please feel free to reopen the PR again. |
Notes for Reviewer
Here is the pull request with fixed branch name and better formatting.
Pre-Review Checklist for the PR Author
SPDX-License-Identifier: Apache-2.0 OR MIT
iox2-123-introduce-posix-ipc-example
)[#123] Add posix ipc example
)task-list-completed
)Checklist for the PR Reviewer
Post-review Checklist for the PR Author
References
Use either 'Closes #123' or 'Relates to #123' to reference the corresponding issue.
Closes #29