Repository navigation
shell: resolve symlinked OpenXR active runtime library paths - #165
Open
AngelBePro wants to merge 1 commit into
Open
AngelBePro wants to merge 1 commit into
AngelBePro wants to merge 1 commit into
Conversation
manifest_library() anchored a relative runtime.library_path to manifest.parent(), which is lexical. When the active runtime is the common ~/.config/openxr/1/active_runtime.json symlink (e.g. WiVRn, SteamVR), that resolved against the symlink's directory and reported a missing library even though the target manifest's relative path was valid. Canonicalize the manifest before taking its parent, falling back to the original path on failure. Adds a regression test covering the symlinked active-runtime case.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This branch has not been deployed
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.
What happened
When the system active OpenXR runtime is a symlink (the common case, e.g.
~/.config/openxr/1/active_runtime.json -> /usr/share/openxr/1/openxr_wivrn.jsonfor WiVRn), Cordial reports:The library exists at
/usr/lib/wivrn/libopenxr_wivrn.so; the manifest’s relativelibrary_pathis correct relative to/usr/share/openxr/1/.Cause
manifest_library()incrates/cordial-shell/src/vr.rsresolves a relativelibrary_pathagainstmanifest.parent().Path::parent()is lexical, so for a symlinked manifest it anchors to the symlink’s directory (~/.config/openxr/1) instead of the target manifest’s directory.manifest_name()/content reads follow the symlink, so the name resolves to “WiVRn” but the lib base resolves to the wrong place. Affects any runtime whose active-runtime manifest is a symlink and whoselibrary_path` is relative (WiVRn, SteamVR, etc.).Fix
Canonicalize the manifest before taking its parent, falling back to the original path if canonicalization fails. Absolute
library_paths are unchanged.Testing
a_symlinked_active_runtime_resolves_relative_library_paths_against_the_targetcovering the WiVRn symlink+relative-path layout.the_users_active_runtime_wins_over_the_systems/wivrn_steamvr_and_packaged_runtimes_are_found_and_resolve_by_idstill cover the non-symlink and relative-path cases.)