Skip to content
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

Teach rosdep to use ROS_VERSION when resolving conditionals #941

Merged
merged 3 commits into from
Feb 17, 2024

Conversation

cottsay
Copy link
Member

@cottsay cottsay commented Feb 16, 2024

The metadata from REP153 includes the ROS_PYTHON_VERSION, which is currently cached during a call to rosdep update so that it is available to package manifest conditionals during rosdep operations in an environment where ROS_PYTHON_VERSION is not already set.

This change extends that metadata caching to include the ROS_VERSION variable as well. These two values combined with ROS_DISTRO, are the three variables supplied by Bloom during manifest conditional evaluation. It makes sense to treat them the same way here.

Reproduction:

  1. Start with a clean environment with no workspaces sourced
  2. $ git clone https://github.com/autowarefoundation/tvm_vendor.git (or any package which uses ROS_VERSION)
  3. $ rosdep keys --rosdistro humble --from-path tvm_vendor

Expected results:

ocl-icd-opencl-dev
spirv-headers
libopenblas-dev
git
libxml2
opencl-headers
ament_cmake
spirv-tools
ros_environment
libvulkan-dev

Actual results:

libopenblas-dev
libxml2
ros_environment
git

The metadata from REP153 includes the ROS_PYTHON_VERSION, which is
currently cached during a call to `rosdep update` so that it is
available to package manifest conditionals during rosdep operations in
an environment where ROS_PYTHON_VERSION is not already set.

This change extends that metadata caching to include the ROS_VERSION
variable as well. These two values, combined with ROS_DISTRO, are the
three variables supplied by Bloom during manifest conditional
evaluation.
@cottsay cottsay self-assigned this Feb 16, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2024

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (f3200d0) 74.28% compared to head (3356db4) 74.22%.

Files Patch % Lines
src/rosdep2/sources_list.py 55.55% 4 Missing ⚠️
src/rosdep2/main.py 75.00% 1 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #941      +/-   ##
==========================================
- Coverage   74.28%   74.22%   -0.06%     
==========================================
  Files          44       44              
  Lines        3364     3376      +12     
==========================================
+ Hits         2499     2506       +7     
- Misses        865      870       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cottsay cottsay merged commit e3c2835 into master Feb 17, 2024
9 checks passed
@cottsay cottsay deleted the cottsay/ros_version branch February 17, 2024 02:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants