Use snapshotted package metadata - #134
Conversation
Signed-off-by: Maurice <mauricepurnawan@gmail.com>
|
I am seeing the same issue in RoboStack/ros-rolling#31, which is what led me to open this PR. However, I noticed that this has been a longstanding issue since last year, with little activity so far. For now, I am opening this as a draft to get the maintainers' thoughts and see whether there is interest in pursuing this approach before I spend more time manually validating it :) |
And that is why this PR is really great, thanks a lot for working on this! |
It is definitely interesting, this issue hit me several time in the past as well. |
Great, I can take another look at this issue once I have cleared the PRs I need to prioritize, probably by the end of August. I will let you know when this is ready to review |
Summary
package.xmlfrom each package's URL and ref inrosdistro_snapshot.yamlProblem
Vinca already used snapshot data for a recipe's source URL, ref, and version, but it continued to use the current live rosdistro cache for
package.xml, package membership, package enumeration, and recursive dependency walking. If package metadata changed after the snapshot was created, a generated recipe could therefore combine old source with new dependencies.A concrete example is
moveit_pyin Rolling:package.xmldepends onpybind11_vendor, and its CMake configuration requirespybind11_vendor.package.xmlinstead depends onpybind11-dev, and its CMake configuration no longer requires the vendor package.With a 2.14.1 snapshot and live 2.15.0 metadata, Vinca omitted the ROS vendor package required by the pinned source and the build failed while looking for
pybind11_vendorConfig.cmake.Fix
When a non-empty snapshot is active, this patch makes it authoritative for package-level data. Pinned manifests are fetched through the existing GitHub, GitLab, or archive paths and cached. Recursive ROS dependencies are then derived from those manifests, with package conditions evaluated and non-ROS dependencies left for normal conda dependency resolution.
The regression tests use synthetic snapshot and live releases with deliberately different dependencies. They verify that the generated recipe contains only the dependency required by the pinned source and that an empty snapshot still follows live rosdistro.
Fixes #93.
Validation
pytest -q vinca/— 117 passedruff check vinca/distro.py vinca/main.py vinca/test_snapshot_metadata.pyruff format --check vinca/distro.py vinca/main.py vinca/test_snapshot_metadata.pypybind11_vendoris selected and live-onlypybind11-devis absent