Skip to content

Doxygen setup - #98

Merged
wjwwood merged 8 commits into
masterfrom
doxygen_setup
Dec 21, 2016
Merged

wjwwood merged 8 commits into
masterfrom
doxygen_setup

Conversation

@wjwwood

@wjwwood wjwwood commented Dec 15, 2016

Copy link
Copy Markdown
Member

This pull request sets up Doxygen and fixes the documentation to look correct when rendered and to reference external data, like cppreference.com (where appropriate).

I've pushed the current state up to http://docs.ros2.org/beta1/api/rcl/. It doesn't have cross referencing to rmw or rosidl since I haven't set them up yet, but it would once I have their tag files.

@wjwwood wjwwood added the in progress Actively being worked on (Kanban column) label Dec 15, 2016
Comment thread rcl/Doxyfile Outdated
# All settings not listed here will use the Doxygen default values.

PROJECT_NAME = "rcl"
PROJECT_NUMBER = beta1

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am not sure if embedding "beta1" here is s good idea. I looks like that would be yet another location in many repos which needs to be updated.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's the version number, it has to be updated every time we change the version. What should I put there instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I would say "master". And when doing the documentation building run temporary replace the string locally before invoking Doxygen. But no need to check the specific build number in.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Ok, I'll put in master in the pr. If I had more time I would make it into a CMake custom command and template the file with the commit hash or branch or tag automatically and handle the tag files through the build/install spaces.

Comment thread rcl/Doxyfile

GENERATE_LATEX = NO

TAGFILES += "../../../../doxygen_tag_files/cppreference-doxygen-web.tag.xml=http://en.cppreference.com/w/"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why the need for these relative paths? They will likely be a problem on other machines.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

For TAGFILES references, the ../../../../doxygen_tag_files is next to the install, build, and src folders in our standard layout. If this file doesn't exist, it just prints a warning and doesn't link to cppreference. I don't know what else I would put here, so again what should I put here instead?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

That assumes that users have cleaned the various repos with the same hierarchy as in the repos file. I just want to point out that this is very fragile and making assumptions you can't control. Maybe there is nothing "better" we can do for now.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah, it's definitely fragile, but without templating the Doxygen file each time or doing some weird cat + echo stuff (recommendation of Doxygen http://stackoverflow.com/a/11038467/671658) I cannot create/use these files dynamically.

Comment thread rcl/src/rcl/client.c
rcl_client_options_t
rcl_client_get_default_options()
{
// !!! MAKE SURE THAT CHANGES TO THESE DEFAULTS ARE REFLECTED IN THE HEADER DOC STRING

@dirk-thomas dirk-thomas Dec 15, 2016 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see why this comment is necessary. The same applies basically to every line of code. If the developer changes behavior he needs to consider upgrading related documentation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because in this case (as opposed to "every line of code") this is very easy to forget or not even know that the documentation exists elsewhere and the information about what the defaults are used is basically duplicated information, which we can avoid in most code only cases. I'm just trying to help future developers out, you may think it unnecessary, but I think it helps, so unless there is a good reason to exclude it, I will leave it.

@Karsten1987 Karsten1987 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks good to me.
Overall all links seem to work.

A few remarks though:

  • As discussed offline, function can be a bit long due to all macros (RCL_PUBLIC, UNUSED_WARN, ..)
  • Not sure, if that is possible: As we prefix all functions with 'rcl', any function indexing is kind of pointless. is there any function for parsing this as a prefix?

Comment thread rcl/include/rcl/rcl.h
// See the License for the specific language governing permissions and
// limitations under the License.

/** \mainpage rcl: Common functionality for other ROS Client Libraries

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Shouldn't that be a brief description?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I don't know what you mean? This is the title of the main page.

* This object can be obtained using a language appropriate mechanism.
* \TODO(wjwwood) probably should talk about this once and link to it instead
* For C this macro can be used (using std_msgs/String as an example):
* \todo TODO(wjwwood) write these instructions once and link to it instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

double todo necessary here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, the \todo causes doxygen to render it, but the TODO is something that can be found by our linters and editors automatically. Doxygen will not render \TODO and my editor will not highlight \todo only.

@wjwwood

wjwwood commented Dec 16, 2016

Copy link
Copy Markdown
Member Author

@Karsten1987 I looked into it a bit and even with different themes and stuff, the bottom issue is that the return type and the function name/parameters are in side by side table cells and so the longest return type drives the width. Unfortunately that is caused by the actual type on most pages, e.g. const std::vector< rclcpp::callback_group::CallbackGroup::WeakPtr > & on http://docs.ros2.org/beta1/api/rclcpp/classrclcpp_1_1node_1_1_node.html. The macros are distracting, but not the main issue in my opinion. The templates and parameters rendering are also problematic too.

I'd look into it more, but I don't think I have time to right now, so I'd like to leave it for now and address some of the look and feel stuff later.

@wjwwood wjwwood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Dec 21, 2016
@wjwwood wjwwood self-assigned this Dec 21, 2016
@wjwwood

wjwwood commented Dec 21, 2016

Copy link
Copy Markdown
Member Author

Now that the beta is out, I'd like to get these basic configurations and documentation updates merged. Looking for a review.

@wjwwood
wjwwood merged commit 88888fb into master Dec 21, 2016
@wjwwood
wjwwood deleted the doxygen_setup branch December 21, 2016 02:30
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Dec 21, 2016
emersonknapp pushed a commit to aws-ros-dev/rcl that referenced this pull request Jun 3, 2019
* Force flush for rcutils logging

* Update logging.c

* Fix logging.c as per the review received.

* Remove redundant else case

Also added the name of the environment variable failing in the same function block,

* Clean up the fprintf section

* Update logging.c

* Double check fprintf functions for correct spacing

Apply space for wraped strings inside fprintf.

* add space between two strings

* remove unnecessary quotes

* add space between two strings
ivanpauno pushed a commit that referenced this pull request Jan 2, 2020
Control shared/static linking via BUILD_SHARED_LIBS and ament_cmake_ros
ivanpauno pushed a commit that referenced this pull request Jan 2, 2020
* Added support for pthread-based thread local storage (e.g. for iOS < 10.0)

* Readd SHARED to add_library until ROS2 can be built statically via ament_cmake_ros

* change detection of apple OS's

also undef RMW_THREAD_LOCAL to cause compiler
error in the case that pthread must be used

* line length fix

* remove SHARED again now that #98 has been merged
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