feat: add native Tomie adapter and strict import compatibility checks

This commit is contained in:
mrleo1nid committed 2026-10-25 11:02:52 +03:00
1 parent c8d83b3fe7
commit 57a4edcbfd
45 files changed
+2985 -71

No files matched your search

+4 -3
View File
@@ -23,6 +23,7 @@ from app.converter.rpa import RpaError, extract_rpa, read_index
from app.converter.rpy_lexer import ParseError
from app.converter.rpy_parser import RpyParser, ScriptData
from app.converter.rpyc import decompile_missing
from app.converter.source import read_source
SCRIPT_EXTS = (".rpy", ".rpyc", ".rpym", ".rpymc")
@@ -73,9 +74,9 @@ def analyze(src: Path, dump: Path | None = None) -> dict:
lines = 0
for p in rpy:
rel = p.relative_to(work).as_posix()
text = p.read_text(encoding="utf-8", errors="replace")
lines += text.count("\n")
try:
text = read_source(p)
lines += text.count("\n")
RpyParser(data, rel).parse(text)
except ParseError as e:
data.warn(f"Ошибка разбора файла: {e.msg}", f"{e.filename}:{e.lineno}")
@@ -104,7 +105,7 @@ def analyze(src: Path, dump: Path | None = None) -> dict:
media = Counter(assets.kind_of(Path(v)) for v in files.values() if assets.kind_of(Path(v)))
return {
"issues": [asdict(Issue("unsupported_script", msg,
data.warning_examples.get(msg, ""), count))
data.blocker_examples.get(msg, ""), count))
for msg, count in data.blockers.items()] +
[asdict(Issue("archive_error", msg)) for msg in rpa_errors],
"game": src.name,