-
Notifications
You must be signed in to change notification settings - Fork 101
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
This is an import of assert.h from rosconsole #112
Conversation
Provide migration path #define and TODO for resolving once provided upstream in ros2/rcutils#112
For this to keep passing the linters we will need to either update the license headers to use |
Please add some test coverage for the new header file. Currently no code uses the newly added header the CI builds won't say anything (syntax correct, behavior correct, etc.). So only the linter tests will provide some feedback. [So the jobs could have been triggered to limit the work to that package (to avoid running for so long).] |
Of course there's a windows issue. It looks like the call is correct: https://docs.microsoft.com/en-us/visualstudio/debugger/debugbreak-and-debugbreak Rerunning: |
Provide migration path #define and TODO for resolving once provided upstream in ros2/rcutils#112
Provide migration path #define and TODO for resolving once provided upstream in ros2/rcutils#112
Signed-off-by: Tully Foote <[email protected]>
Add unit tests for assert and remove CMD version. Signed-off-by: Tully Foote <[email protected]>
Working around ament/ament_lint#82 Signed-off-by: Tully Foote <[email protected]>
Signed-off-by: Tully Foote <[email protected]>
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
// POSSIBILITY OF SUCH DAMAGE. |
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 am not sure importing this BSD licensed snippet is a good idea since it would affect the license of a pretty low level ROS 2 package.
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.
Maybe we can ask the authors to change the license (or dual license it, which seems to be popular these days). I didn't blame the file, but it seems likely that it's just us and Josh Faust maybe that would need to be asked?
Upon further review of our licensing we already have dual licensing as low as rcpputils is a similar manner for small files imported from legacy code bases. That I identified in ros2/rcpputils#37. To that end it does not make a lot of sense to be a complete stickler for this one as opposed to that one. If there is an issue at some point someone can reimplement it relatively easily compared to doing full due diligence and contribute the new implementation back. In the mean time this is something that would be useful for anyone migrating from ROS 1. |
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 still not convinced we couldn't just re-implement it, but if we are going to try and merge this, then the package.xml
and LICENSE
file needs to be updated.
re: ament/ament_lint#209 Signed-off-by: Tully Foote <[email protected]>
This PR has been open for 4 years now, and given that there hasn't been too much movement on it, I'm going to assume that it is not all that interesting. I'm going to close it out for now, but please feel free to reopen if you think this is something we should have. |
The ability to use the BREAK and ASSERTS with integrated messages will improve our code quality and also enable easier porting of code from ROS 1. It is a relatively small code snippet and could be re-implemented to comply with Apache 2.0 relatively easily. But I'm not sure how to do that cleanly without it being considered a derivative. |
It adds the useful macros
RCUTILS_BREAK()
RCUTILS_ASSERT(cond)
RCUTILS_ASSERT_MSG(cond, ...)
RCUTILS_ASSERT_CMD(cond, cmd)