Call for contributions: audit the functions that return success and do nothing

Đang mở
#704 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
56/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
cpp, python
Lĩnh vực
backend, testing

Hướng nghiên cứu

From the repository root, use the tools/progress.py scanner command in the issue to list inert functions for one library; choose a library with 5 to 20 entries. Read the library implementation and relevant SDK or console behavior evidence before deciding whether to implement, throw with NotImplemented_nid_no_patch(__func__), or document a silent stub in docs/dev/debt/changes/<branch>.md. For implementations, add a guest test under core/libs/tests/; for throws, compare scanner counts and run ctest --test-dir build --output-on-failure.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area: libs documentation good first issue help wanted

Call for contributions: audit the functions that return success and do nothing

Why

The rule of the project is that a function either does what it should or throws. A function that returns success and does nothing breaks that rule quietly: the title goes on, and the bug appears much later. The library scanner in tools/progress.py counts these (inert_names of each library): 2,731 of the 18,502 implemented exports have a body that returns without effect. 256 more are documented as silent stubs in docs/dev/debt/. Not every one is wrong (some console functions really do nothing on a retail system), but each needs a decision on record.

What to do
  1. Pick a library (the biggest ones are listed above; a library with 5 to 20 inert functions is a good first pull request). Get the list with the scanner, from the repository root: python3 -c 'import sys; sys.path.insert(0, "tools"); import progress; print([g for g in progress.collect_libraries()["groups"] if g["name"] == "<library>"][0]["inert_names"])' (the command line of tools/progress.py itself currently fails on AnyKyty, see call 9).
  2. For each function choose one:
    • implement it, if the console's behaviour is public or you can state where it comes from;
    • make it throw with NotImplemented_nid_no_patch(__func__), if nothing should reach it;
    • keep it as a silent stub and add an entry to the library's debt file through a fragment (docs/dev/debt/changes/<branch>.md), saying what the console does instead and what would close the entry (Closes when:).
  3. One library per pull request. Say in the pull request how many functions you looked at and what you decided for each.
Expected result

Fewer functions that lie, and a debt file that says why each remaining one does.

How to test without our games

For a function you implement: a guest test (core/libs/tests/Guest<Name>.cpp, registered with add_test_executable). For a switch to NotImplemented_nid_no_patch: the same scanner call before and after (the inert count falls, the unimplemented count rises), and ctest --test-dir build --output-on-failure still passes.

Difficulty

good first issue. No knowledge of the GPU side needed.

Who to ask

Ask in this issue; the maintainers read every comment.

Rules that apply to every call
  • Comment on the issue before you start, so two people do not do the same work. One topic per pull request, against AnyKyty.
  • Conventional Commits (fix(libkernel): ..., feat(libScePad): ..., test(...), docs: ...). No comments in code. Nothing specific to one title: no title IDs, no data taken from a game, no per-title branches.
  • Every export either does exactly what it should or throws: an unimplemented export calls NotImplemented_nid_no_patch(__func__). A silent stub is allowed only when it unblocks a title and only affects the UI; list it under "Silent stubs" in the library's file in docs/dev/debt/ through a fragment (docs/dev/debt/changes/<branch>.md, see docs/dev/TechnicalDebt.md).
  • Say where a behaviour comes from: public SDK headers and documentation, a published reverse-engineering write-up, or your own analysis of your own console's system modules. Do not post or attach firmware files, system modules or game files.
  • Each test finishes in 30 s on the CI runners. python3 tools/check_conventions.py --base origin/AnyKyty must pass before you push.
  • Build and test: docs/dev/START_HERE.md and docs/dev/BUILD.md. CI runs the library tests on GitHub's runners (no GPU, no game) on Linux and Windows.
Ngôn ngữ chính
C++
Star
214
Fork
7
Merge trung bình
7 giờ 53 phút
Pull request đã merge (30 ngày)
280

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của simnJS/AnyPS5

Tất cả issue của simnJS/AnyPS5

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.