Repository navigation
Conversation
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The JSON preview uses the existing stub-generation functions without writing files, and its exact-head tests verify parity with the original generator.
What I ran
- Reviewed head
2b2c61c36de8268a9752c122969af258acd257e8against currentmain58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48. - Merge preview was clean: tree
d7b6385e5a91258735409de04470e5bd3ffdec62. - Environment: Debian Linux, Python 3.11.2. The focused unit test ran in an isolated detached worktree at the PR head. I did not build or configure AnyPS5.
- Commands:
git merge-tree --write-tree 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48 2b2c61c36de8268a9752c122969af258acd257e8
git diff --check 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48...2b2c61c36de8268a9752c122969af258acd257e8
python3 tools/check_conventions.py --base 58d5af7daa8087d2ffbdb50ae6e0db3cb6a88e48 --head refs/remotes/upstream/pr-13300 --title 'feat(tools): preview generated stubs as JSON' --body /tmp/pr-13300-body.md
python3 -m unittest tools.tests.test_preview_stubs
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13300Results
| Check | Result |
|---|---|
| Current-main diff | Three files: the CLI, its unit test, and CTest registration. |
| Current-main merge preview | Pass; clean tree d7b6385e5a91258735409de04470e5bd3ffdec62. |
| Diff whitespace check | Pass; no output. |
| Conventions and PR template | Pass; All conventions checks passed. |
| Focused Python tests | Pass; 2 tests. |
| Precheck | Syntax, unit tests, Python test registration, conventions, diff check, and live mergeability passed. The test-quality heuristic could not run because tools/pr_test_quality.py is absent from the isolated PR snapshot. Its base snapshot was 42d009f; current main is 58d5af7, so I repeated the merge, diff, and conventions checks against current main. |
| Hosted checks | Conventions, eligibility, and intake pass. Labels and relinker/Windows jobs were pending; Linux product was skipped by workflow policy. |
Unedited focused-test output
..
----------------------------------------------------------------------
Ran 2 tests in 0.347s
OK
Findings
Blocking
None found in the reviewed head.
Non-blocking
The author reports an additional mutation control; I did not independently reproduce it. The output is a preview artifact and does not implement or compile any generated exports, as the PR description states.
Sources
- Preview CLI at the reviewed commit
- Focused tests at the reviewed commit
- Existing generator used by the CLI
Not verified
I did not configure/build CMake or run CTest; I ran the Python test directly. The hosted platform jobs still pending were not treated as passed.
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Closing this one, with the reasons below; you're welcome to reopen if they are addressed.
If there is a concrete workflow that needs structured output, an option on |
What
Adds preview_stubs.py, a read-only JSON view of the existing stub generator: deduplicated NIDs, emitted code and technical-debt text. It has no output-file or network operation.
Implementation basis: Calls the existing parse_nids, parse_db and generate functions. A real CLI fixture checks explicit unknown bindings, preserved throwing placeholders, duplicate NIDs, UTF-8, invalid inputs and exact compatibility with the original generator's code/debt streams.
Known limits: The existing generator's unknown signatures remain unknown. The JSON is a review/planning artifact: emitted placeholders are not implemented exports, not verified ABI declarations and not compiled or installed by this command. Input decoding/name validation follow stubgen's existing policy.
Source/schema: tools/preview_stubs.py tools/stubgen.py
Exact topic head
2b2c61c36de8268a9752c122969af258acd257e8is one independent commit on main51c31ea17e9f66cb36fe9655ec31c81610bfcfc9. The current-main repository overlap checker against51c31ea17e9f66cb36fe9655ec31c81610bfcfc9reported no confirmed overlap. It could not finish comparisons for these older PRs already conflicting with main: #674, #1835, #3786, #5021, #7642, #9539, #10897, #12862. Their shared-file diffs were reviewed separately. 7 scoped file changes projected onto main and then combined with this topic without a new conflict; 1 peer file changes already conflict with main and are not claimed automatically mergeable. They do not provide this command or test matrix. Registration uses a separate target/name and there is no landing-order dependency. Changes to shared registration before landing need a refreshed merge/test check. Depends on: none. The twenty current topic heads are also merged into tested integrationcedab5157a32822332671c90812c6780d05157e8.Tested
Topic head:
2b2c61c36de8268a9752c122969af258acd257e8. Combined integration:cedab5157a32822332671c90812c6780d05157e8, based on main51c31ea17e9f66cb36fe9655ec31c81610bfcfc9. Ubuntu/WSL GCC 15.2, CMake 4.2.3, Python 3.14.4; Windows MinGW GCC 15.2, CMake 4.3.1, Python 3.14.3.python tools/tests/test_preview_stubs.py: 2 tests passed on each platform, no skips. A mutation in the actual new tool was rejected by the fixture.Registered CTest
tools_stub_previewpassed on Linux and Windows as part of the filtered twenty-topic run:ctest --test-dir <build> -R <20-topic-pattern> -j 8 -V --output-on-failure, 20/20 passed on each platform, zero skips.cmake --build <linux-full-build> --parallel 8: complete default Linux product build passed. Windows used the full configuration and built the sixteen affected libc test targets plus relinker with--parallel 8; a complete default Windows build is not claimed. Conventions, whitespace, script registration and the public-header declaration/umbrella audit passed. No PS5, title or GPU validation run is claimed. macOS, WASM execution and hosted full-build CI are not reported as passed.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)