feat(tracker): report a scene module under the engine it runs in
Binaries from a module snapshot carry host_family (from module_of); the roadmap lists a module type's presence by that engine family. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
4e65268a1e
commit
7d85a69274
+6
-6
@@ -5,11 +5,11 @@
|
||||
Per scope: methods without a registration (with the signature read from the original),
|
||||
emulator stubs, events and properties the emulator never names. Every item lists the engine
|
||||
families whose DLLs have it - an item present in every family is core API, one present only
|
||||
in BlooMoo is late. With `--usage` (python -m ams.usage) every item also says how many games
|
||||
use it and in how many places of their scripts, gaps are ordered by that, and the report
|
||||
lists the most used gaps and what the scripts use beyond the original's known API. The report
|
||||
restates the tracker's limits: registration is not correctness, and "never named" means no
|
||||
literal was found.
|
||||
in BlooMoo is late; a scene module counts as the engine it runs in. With `--usage`
|
||||
(python -m ams.usage) every item also says how many games use it and in how many places of
|
||||
their scripts, gaps are ordered by that, and the report lists the most used gaps and what
|
||||
the scripts use beyond the original's known API. The report restates the tracker's limits:
|
||||
registration is not correctness, and "never named" means no literal was found.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -127,7 +127,7 @@ def used_text(use) -> str:
|
||||
|
||||
|
||||
def render(tracker: dict, usage: dict | None = None) -> str:
|
||||
family_of = {b["id"]: b.get("family") for b in tracker["binaries"]}
|
||||
family_of = {b["id"]: b.get("host_family") or b.get("family") for b in tracker["binaries"]} # modules: their engine
|
||||
types = {t["name"]: t for t in tracker["types"]}
|
||||
used, outside, counted = usage_index(usage, types) if usage else (None, None, None)
|
||||
scopes = [scope_gaps(t, family_of, used) for t in tracker["types"] if t["name"] not in HIDDEN]
|
||||
|
||||
@@ -417,6 +417,9 @@ def build_tracker(snapshots: list[Snapshot], emulator: dict, reviews: list[dict]
|
||||
"engine": snap.binary.get("engine"), "identity": "binary" if sha else "snapshot_only",
|
||||
"library": snap.binary.get("library", snap.binary.get("name", "?").split("__")[-1]),
|
||||
"family": binary_family(snap.binary),
|
||||
# A scene module runs inside the engine it imports.
|
||||
"host_family": binary_family({"library": snap.binary["module_of"]})
|
||||
if snap.binary.get("module_of") else None,
|
||||
"sources": snap.binary.get("sources", []), "games": snap.binary.get("games", []),
|
||||
"coverage": snap.raw.get("coverage", snap.raw.get("extraction", {}).get("scope",
|
||||
snap.binary.get("extraction", {}).get("coverage"))),
|
||||
|
||||
Reference in New Issue
Block a user