fix: mark non-Linux stub functions as const fn - #87
Merged
Conversation
Fixes a clippy missing_const_for_fn lint that only surfaces when building on non-linux targets, since the function is cfg-gated to non-linux and therefore never compiled (or linted) by Linux-only CI. Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
Fixes the remaining missing_const_for_fn clippy lints that only surface when building on non-linux targets. Each stub is cfg-gated to non-linux and therefore never compiled or linted by Linux-only CI. Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
python_launcher_prefers_path_python_* assumed every host has a wheel platform tag; skip when current_platform_wheel_tags() has no match (e.g. macOS) since python selection always falls through to managed. runtime_environment_preloads_managed_rocm_paths asserted LD_LIBRARY_PATH on any non-Windows host, but it's only set on Linux. Signed-off-by: fredespi <fredrik.espinoza@gmail.com>
fredespi
force-pushed
the
fix-cgroup-missing-const-lint
branch
from
July 8, 2026 13:00
90e406c to
0a3a9f7
Compare
juhovainio
approved these changes
Jul 8, 2026
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.
Summary
cargo clippy --workspace --all-targets -- -D warningsflaggedmissing_const_for_fnon several non-Linux stub functions that trivially return a constant value and have no reason not to beconst fn.container_id_for_pid(cgroup non-Linux stub) and severalrocm-corenon-Linux stub functions asconst fn.python_launcher_prefers_path_python_*,runtime_environment_preloads_managed_rocm_paths) that incorrectly assumed properties true only on Linux/Windows.Test plan
cargo clippy --workspace --all-targets -- -D warningspassescargo fmt --checkpassescargo test --workspace --all-targetspasses