Repository navigation
Fix robin_hood macro continuation for MSVC - #6276
SteveMacenski merged 1 commit into
Conversation
|
FYI @wep21 @traversaro, this was opened from the RoboStack upstreaming tracker: RoboStack/robostack#124 |
SteveMacenski
left a comment
There was a problem hiding this comment.
So this one I’m a little worried about. The performance boost from using this other implementation is quite large. I wouldn’t want an OS choice to define such a huge change. What’s going on with the robinhood library causing it to not be compatible with windows?
|
That makes sense. I opened a RoboStack CI probe that removes the Windows fallback to I will follow up here with the actual error once CI has shown it. |
72101ba to
3a7423c
Compare
|
Thanks, you were right to question the I opened a RoboStack kilted probe PR to force the Windows rebuild with the downstream fallback removed: RoboStack/ros-kilted#92 That reproduced the actual failure. The other platforms passed, and Windows failed while compiling The cause is the |
This upstreams the Windows robin_hood portability part of RoboStack patch patch/ros-rolling-nav2-smac-planner.win.patch. RoboStack CI reproduced the Windows failure with the robin_hood fallback removed: MSVC reports syntax errors in the vendored robin_hood.h while compiling a_star.cpp. The issue is a NOLINT comment after a macro-continuation backslash in ROBIN_HOOD_COUNT_TRAILING_ZEROES, which prevents MSVC from continuing the macro body. Remove that inline comment so Windows builds can keep using robin_hood::unordered_node_map, avoiding the performance change from falling back to std::unordered_map. The RoboStack ODE packaging workaround is intentionally not included. Signed-off-by: Tobias Fischer <[email protected]>
3a7423c to
b15feb3
Compare
This upstreams the Windows robin_hood portability part of RoboStack patch patch/ros-rolling-nav2-smac-planner.win.patch. RoboStack CI reproduced the Windows failure with the robin_hood fallback removed: MSVC reports syntax errors in the vendored robin_hood.h while compiling a_star.cpp. The issue is a NOLINT comment after a macro-continuation backslash in ROBIN_HOOD_COUNT_TRAILING_ZEROES, which prevents MSVC from continuing the macro body. Remove that inline comment so Windows builds can keep using robin_hood::unordered_node_map, avoiding the performance change from falling back to std::unordered_map. The RoboStack ODE packaging workaround is intentionally not included. Signed-off-by: Tobias Fischer <[email protected]> Co-authored-by: Daisuke Nishimatsu <[email protected]>
This upstreams the Windows robin_hood portability part of RoboStack patch patch/ros-rolling-nav2-smac-planner.win.patch. RoboStack CI reproduced the Windows failure with the robin_hood fallback removed: MSVC reports syntax errors in the vendored robin_hood.h while compiling a_star.cpp. The issue is a NOLINT comment after a macro-continuation backslash in ROBIN_HOOD_COUNT_TRAILING_ZEROES, which prevents MSVC from continuing the macro body. Remove that inline comment so Windows builds can keep using robin_hood::unordered_node_map, avoiding the performance change from falling back to std::unordered_map. The RoboStack ODE packaging workaround is intentionally not included. Signed-off-by: Tobias Fischer <[email protected]> Co-authored-by: Daisuke Nishimatsu <[email protected]>
|
The no lint find is clever. The error looked weird to me and I didn't bother to do the deep dive to find it. |
This is part of an effort to contribute RoboStack downstream patches back upstream.
Origin:
patch/ros-rolling-nav2-smac-planner.win.patch, authored by Daisuke Nishimatsu.RoboStack's Windows patch previously avoided the bundled
robin_hoodcontainer on Windows. After re-checking with a dedicated RoboStack CI probe, the specific MSVC failure is in the vendoredrobin_hood.hmacro body: a// NOLINTcomment appears after a macro-continuation backslash, so MSVC does not continue the macro and reports syntax errors around the followingreturn.This keeps
robin_hood::unordered_node_mapas the Smac planner graph container on Windows and fixes the macro continuation instead, avoiding the performance concern from falling back tostd::unordered_map.The RoboStack ODE packaging workaround from the downstream patch is intentionally not included here.
Related RoboStack tracking issue: RoboStack/robostack#124