fix(ros): avoid pixi lock panics on unmappable ROS dependencies#6290
Open
baszalmstra wants to merge 2 commits into
Open
fix(ros): avoid pixi lock panics on unmappable ROS dependencies#6290baszalmstra wants to merge 2 commits into
baszalmstra wants to merge 2 commits into
Conversation
…names
The `liblttng-ust-dev` RoboStack mapping used a `${{ "lttng-ust" if linux }}`
selector value that the simple YAML loader stored verbatim and wrapped as a
concrete MatchSpec. The literal `${{` then reached MatchSpec parsing during
`pixi lock` and panicked with `InvalidPackageNameMatcher`. Rewrite that entry
to the platform-dict form the loader already supports, so it resolves to
`lttng-ust` on linux and to nothing elsewhere. This is the single templated
entry in the bundled map, which is the cause of prefix-dev#6288 (agnocast
depends on `liblttng-ust-dev`).
Also add an explicit `crypto++ -> cryptopp` mapping, and guard the resolver:
every resolved spec is now validated as a strict conda MatchSpec, so an
unmapped rosdep whose synthesized `ros-<distro>-<name>` is not a valid conda
name (e.g. one containing `+`) fails with an actionable
InvalidCondaPackageSpec error instead of panicking downstream.
https://claude.ai/code/session_01KeCkAavwYWnLYVGpGmVjNc
Drop the robostack.yaml suggestion from the InvalidCondaPackageSpec help (users can't edit the bundled map) and point only at `extra-package-mappings`. Condense the surrounding doc/test comments. https://claude.ai/code/session_01KeCkAavwYWnLYVGpGmVjNc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes two crashes where
pixi lockwould panic while resolving a ROS workspace with thepixi-build-rosbackend.The first happened when a package depended on something that the package map resolved to a special platform-conditional value, which is what the
agnocastpackages hit. The second happened when a dependency name contained characters that are not valid in a conda package name, such ascrypto++.Both now resolve correctly so the workspace locks. Dependencies that genuinely cannot be mapped to a valid conda package now fail with a clear, actionable error instead of an opaque panic.
Fixes #6288
Fixes #6287
How Has This Been Tested?
Added regression tests covering both previously failing dependencies and the new error path, and ran the backend's test suite.
AI Disclosure
Tools: Claude
Checklist: