Skip to content

Add linux-riscv64 as a known platform - #203

Merged
Tobias-Fischer merged 1 commit into
RoboStack:masterfrom
AFOliveira:riscv/linux-riscv64-platform
Nov 13, 2026
Merged

Tobias-Fischer merged 1 commit into
RoboStack:masterfrom
AFOliveira:riscv/linux-riscv64-platform

Conversation

@AFOliveira

Copy link
Copy Markdown
Contributor

vinca does not know linux-riscv64. On a riscv64 Linux host get_conda_subdir() raises "Unsupported platform", and vinca --platform linux-riscv64 fails with a KeyError in resolve_pkgname_from_indexes(), because the platform is missing from map_platform_python_to_conda.

This adds the platform in the two places that need it:

  • platforms.py: ("linux", "riscv64") is linux-riscv64.
  • resolve.py: linux-riscv64 takes the linux entries of the dependency mappings, as linux-64 and linux-aarch64 do.

Tests (vinca/test_platforms.py): a linux/riscv64 row in the host-detection table, and a new test that linux-64, linux-aarch64 and linux-riscv64 all resolve through the linux mapping.

What exists and what does not

  • conda-forge has a linux-riscv64 subdir. As far as I checked (repodata of 2026-10-31), it has no ROS packages and lacks many of the dependencies ROS recipes need (for example benchmark, cppcheck, uncrustify, console_bridge, a boost matching the ROS distros' pin).
  • RoboStack does not publish linux-riscv64 packages, and I am not proposing that here. This change only lets vinca generate recipes for that platform, which I need as a first step toward building the missing dependencies.
  • With this change, vinca --multiple --platform linux-riscv64, run on an earlier vinca release (837434e) with a ros-lyrical checkout, generated 2153 recipes (1077 ros2-* and 1076 ros-lyrical-* compatibility packages), the same split as for the other platforms. I have not re-run that generation on current master.
  • I did not touch variant_algebra._PLATFORMS, pinning.py's --platform choices or generate_gha.py, which also list platforms. Those are about pinning and CI generation for the published platforms; I would rather ask before adding riscv64 there.

Testing

  • Full test suite on x86-64 Linux, Python 3.12.3: 352 passed, 4 skipped. vinca/test_platforms.py alone: 14 passed (10 before the change).
  • ruff format --check and ruff check pass on platforms.py and test_platforms.py. ruff check (0.17.5) reports 4 findings in resolve.py that are on lines this PR does not touch and are present without it. pyrefly check on the three touched files: 0 errors.
  • Not run: pixi run tasks as CI runs them (Python 3.14, pinned tool versions), Windows and macOS, and anything on an actual riscv64 host.

AI assistance: Claude was used to prepare and test this change.

get_conda_subdir() has no entry for a linux riscv64 host, so vinca
raises "Unsupported platform" there, and an explicit --platform
linux-riscv64 fails in resolve_pkgname_from_indexes() with a KeyError
because the platform is missing from map_platform_python_to_conda.

Map ("linux", "riscv64") to linux-riscv64 and let linux-riscv64 use the
"linux" entries of the dependency mappings, as linux-64 and
linux-aarch64 do. Add test cases for the host detection and for the
dependency lookup.

Tested with the full vinca test suite on x86-64 Linux, Python 3.12
(352 passed, 4 skipped), and ruff format and ruff check on the touched
test and platforms files. Not run: the pyrefly check as CI runs it, or
anything on a riscv64 host.
@Tobias-Fischer
Tobias-Fischer merged commit 18ac8f5 into RoboStack:master Nov 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants