-
Notifications
You must be signed in to change notification settings - Fork 6
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
Better errors from codegen #127
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.
Rather than messages or services can you reference ROS packages? I think that could make it more clear that they can't be standalong message files on disk, they should be part of a package (which is what we search for).
Continuing to add some better messages: Invoking this line: roslibrust_codegen_macro::find_and_generate_ros_messages!("assets/ros1_test_msgs"); Without std_msgs in ROS_PACKAGE_PATH now produces:
|
Alright @ssnover I think this one is really ready for review now. I added a big'ol pile of error improvements, replaced all of the panic! and unwrap() I reasonably could with proper error bubbling, and got the whole thing to print much more understandable errors way more often! |
@ssnover Ping again on re-view, I think you missed this one in last pass cause you had previously reviewed it before the changes, but there is now a lot more here |
Closes: #126
Closes: #128
Trying to catch some common user errors and make them more clear. Investigated automated tests for these kinds of errors, but it looks like it is actually pretty annoying to setup. Looks like this will do the job, but a little much to setup right now: https://crates.io/crates/compiletest_rs
These test checks were manually performed by me while setting this up:
Manually modifying calling_services to introduce a typo on this line:
roslibrust_codegen_macro::find_and_generate_ros_messages!("assets/ros1_common_interfacs",);
Now produces the following compilation error when invoking
cargo run --example calling_service