-
Notifications
You must be signed in to change notification settings - Fork 136
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
Allow rustdoc to run without a ROS distribution #347
Conversation
@Carter12s can you have a look at this? Thanks. I believe this should work with docs.rs, if you pass the feature flag generate_docs (i.e. |
Hey @esteve awesome that you're taking a stab at this. I did make a half hearted attempt a few weeks back, but didn't see any good way to make progress. Your solution is way cleaner than what I was attempting. However, when I went to test this I found you didn't quite make enough changes for it actually work, I pushed what I believe is a working solution to: https://github.com/Carter12s/ros2_rust/tree/docs.rs It appears that when running I actually published successful versions to some alias on docs.rs so you can see a working version with my changes here: |
@Carter12s that's fantastic, thanks! I did run |
@Carter12s I've added your changes and a check to make sure that |
Changes look good to me. No idea what the right way to make clippy not angry is... |
@Carter12s yeah, we either add all of |
Yeah skipping it makes sense to me. |
@Carter12s yay! I managed to make it all build without warnings or errors. Could you have another look? Thanks. |
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.
This looks good to me, though I'm wondering if we should find a spot to document our policies and procedures, as well as other things that developers don't often bump into. For instance, what the steps are for releasing a new version, or how getting rustdoc to run without a ROS distribution is supposed to work. I can foresee a potential maintenance issue in future where the knowledge gets lost/forgotten when we need it.
I don't think it's needed for this particular PR, though. Just food for future thought.
dyn_msg = ["ament_rs", "libloading"] | ||
# This feature is solely for the purpose of being able to generate documetation without a ROS installation | ||
# The only intended usage of this feature is for docs.rs builders to work. | ||
generate_docs = ["rosidl_runtime_rs/generate_docs"] |
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.
Should we document somewhere about how this feature works?
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.
@jhdcs good point. Where do you think it'd be the best place for this?
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'm not sure, it depends on how much information needs to be conveyed. If it can be summarized in a couple of sentences, you might be able to get away with doing it in the comments here. Otherwise, we may need to create a separate documentation file...
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.
This feature's only purpose is so that docs.rs can run ros2-rust, so it's not intended to be used by users.
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.
But nevertheless, I agree with documenting it somewhere, I'll add something more explanatory here and we can move it elsewhere if it needs more details.
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.
@jhdcs can you approve this PR again if it looks good to you? I pushed a change and your review was unfortunately discarded. Thanks.
Fixes #336