Skip to content

docs: two usage lines that contradict their scripts (testing.md build.py arguments, meta_to_xml.ps1 output names) - #4212

Open
Pierre-Kookis wants to merge 1 commit into
ItsNotRexed:mainfrom
Pierre-Kookis:docs-usage-lines
Open

Pierre-Kookis wants to merge 1 commit into
ItsNotRexed:mainfrom
Pierre-Kookis:docs-usage-lines

Conversation

@Pierre-Kookis

Copy link
Copy Markdown

Claim: #4084 (comment) (new BUILD item, no ID assigned yet)

What changed and why

Two usage lines said something their scripts don't do:

  • docs/testing.md ~line 96 said build.py and check.py "take the same folder as their second argument". Only check.py does (runtime/test/shaders/check.py ~1503). build.py reads everything after the output folder as test shader names (~188), so build.py <out> <runtime-windows> stops with Unknown test shaders: <runtime-windows> (~192). The line now says so; the example under it was already right.
  • scripts/meta_to_xml.ps1 line 4 said each blob becomes <offset>.xml. Line 42 writes <offset>.pso.xml or <offset>.rbf.xml, and tests/test_meta_to_xml_paths.py already checks the .pso.xml name.

Test: test_a_runtime_folder_as_second_argument_is_refused_as_a_shader_name in tests/test_shader_build_fallbacks.py runs build.py (translator stubbed, as the other tests in that file do) with a folder as its second argument and checks that it exits with Unknown test shaders: <folder> without asking the translator for anything. It passes on main too: it pins the behaviour the corrected line describes.

Tests

Windows 11, Python 3.13.14, no GPU, no game files.

  • python -I tests/test_shader_build_fallbacks.py: 5 tests, OK.
  • python -I tests/test_meta_to_xml_paths.py: OK (Windows PowerShell 5.1).
  • python -I tests/test_docs_links.py, test_docs_table_rows.py, test_docs_design_rows.py, test_text_write_line_endings.py: OK.
  • python -m compileall -q make_game.py tools tests and git diff --check: clean.

AI-assisted (Claude Code; the two mismatches were first spotted by a Codex read of the docs, then checked by hand).

- docs/testing.md said build.py and check.py both take the runtime folder
  as their second argument. Only check.py does; build.py reads everything
  after the output folder as test shader names and stops with
  "Unknown test shaders: <folder>". A test in test_shader_build_fallbacks.py
  pins that.
- scripts/meta_to_xml.ps1's header said each blob becomes <offset>.xml; it
  writes <offset>.pso.xml or <offset>.rbf.xml (test_meta_to_xml_paths.py
  already checks the .pso.xml name).

AI-assisted (Claude Code).

@sds-228 sds-228 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review of ac10780: no issues found. The docs now distinguish the runtime-folder argument from shader names, and the new test confirms build.py rejects that argument. Targeted suite: 5 tests OK.

AI-assisted (OpenCode).

@DoubleD17

Copy link
Copy Markdown

Independent Windows check of ac107802 (Windows 11, Python 3.13.3, Windows PowerShell 5.1).

  • tests/test_meta_to_xml_paths.py passed, including the bracketed-path cases.
  • I also ran the exporter with both a synthetic PSO and a synthetic RBF in the same archive, using local parser stubs. Under paths containing spaces and brackets, it wrote 000000000000.pso.xml and 000000000020.rbf.xml with the expected stub contents.
  • A direct build.py CLI check with a runtime directory containing spaces and brackets as argument two gave Unknown test shaders and exited before creating the output directory.

Synthetic fixtures only. AI-assisted.

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.

3 participants