Skip to content

feat(relinker): support explicit CLI help - #2117

Merged
oneandonlydean merged 1 commit into
boykopovar:mainfrom
krishalivaibhav:codex/relinker-help
Oct 10, 2026
Merged

oneandonlydean merged 1 commit into
boykopovar:mainfrom
krishalivaibhav:codex/relinker-help

Conversation

@krishalivaibhav

@krishalivaibhav krishalivaibhav commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

What

relinker --help currently fails with an unknown-option error. Recognize --help, print the shared usage text to stdout, and exit successfully before opening input files, writing output or registries, or running the converted executable. A help request does not require input/output paths. Unknown options, missing option values, and incompatible options still fail normally; --help consumed as an option value retains its literal meaning.

Add a CTest process-level regression test covering the success status/output, existing-output preservation, absence of registry/conversion side effects, and retained parser errors. Short -h remains a positional argument.

Related: #1856 adds parser unit tests but does not implement help. Its existing test source was compiled against this parser and passed. No dependency on #1856.

Tested

Latest publication head 0cdc9988 incorporates upstream main 745b775e without conflicts. Relinker-only Release build and all 38 local CTest tests passed on Apple M2 (5.81 seconds, 30-second per-test timeout), including the merged parser tests and cli_help. Conventions, test registration and whitespace checks passed. Both independent reviewers rechecked the final diff with no actionable findings. Hosted results below apply to the earlier CLI commit, not this updated head.

Open overlaps #2119 and #2154 implement separate features and are not dependencies. When integrating those branches, retain centralized usage text with both CLI switches and preserve both independent Python test registrations.

Apple M2 / 16 GB, macOS 27.2, AppleClang 17, CMake 4.4.4, Ninja 1.13.2; based on main 6cc0503d.

  • Relinker-only Release configure/build succeeded.
  • 35/35 registered CTest tests passed with a 30-second per-test timeout (6.59 seconds total).
  • The new CLI help test fails against the baseline executable with unknown option: --help and passes after the change.
  • Parser tests from test(relinker): cover CLI argument parsing #1856 head f765b27c compiled against this parser and passed.
  • Conventions, test registration and git diff --check passed.
  • Exact CLI commit 6e2e076: GitHub-hosted standalone relinker builds/tests passed on macOS, Linux and Windows (run). Full Linux/Windows builds at this commit hit the existing missing SPIR-V header include error, also observed on the upstream baseline.
  • Separate integration branch combines this CLI commit with the two CMake include-path fixes from existing PR fix(build): declare SPIRV headers for Vulkan helper tests #2093; those fixes are not included in this PR. Integration run: full Linux passed (479 passed, 26 skipped); Windows compiled successfully (303 passed, 191 skipped, 1 failed). The CLI help test passed on both platforms.
  • Remaining Windows failure: guest_video_out_wqhd_detection reports missing VK_KHR_surface, prints a skip message, but CTest reports failure despite configured skip return code 77. Its exit behavior remains unresolved. This is a separate executable with no CLI parser/main dependency; no passing full Windows suite is claimed.
  • Two independent agent reviews found no actionable CLI correctness or test coverage issues. No game execution was tested.

Checklist

  • Updated with main at 745b775e; overlapping open PRs checked
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw; no runtime exports or silent stubs changed
  • No notes, investigation .md files or images added to the repository
  • New third-party code is a submodule built from source; none added
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes, prepared with Codex; the submitting author is responsible for the code

@MarcZX10

MarcZX10 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

FYI, #2154 adds an independent Windows diagnostic fixture-isolation CTest in the same Python-enabled block of core/relinker/CMakeLists.txt. A sequential merge of the two PRs currently conflicts in that file. When rebasing, keep both the cli_help and windows_diagnostic_fixture_isolation registrations; they cover separate behaviors.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

This conflicts with main after today's merges; could you rebase? It passed testing and is otherwise ready.

@github-actions

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#2561 core/relinker/cli/tests/test_help.py

@oneandonlydean
oneandonlydean merged commit 6635c7a into boykopovar:main Oct 10, 2026
9 checks passed
@nyavana

nyavana commented Oct 10, 2026

Copy link
Copy Markdown
Contributor

The usage guide still says there is no --help flag. This small documentation follow-up corrects that and the help/no-argument exit codes: nyavana@609a1c3

Verified with a Linux relinker build, cli_help, and direct CLI checks. Sharing for consideration. AI-assisted.

SleglJan pushed a commit to SleglJan/AnyPS5 that referenced this pull request Oct 10, 2026
…r-help

feat(relinker): support explicit CLI help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants