This commit is contained in:
Mateusz Gruszczyński committed 2026-10-19 11:09:48 +02:00
1 parent 4afa88a65e
commit 2ab44c4c62
49 files changed
+1523 -176

No files matched your search

+1
View File
@@ -385,6 +385,7 @@ Environment=MALLOC_ARENA_MAX=2
Environment=PATH=/usr/local/bin:/usr/bin:/bin
EnvironmentFile=-/etc/rustproxy/environment
ExecStart={args}
ExecReload={prefix}/current/rust-proxy --data-dir {data} --admin-listen {record["admin"]} reload
Restart=on-failure
RestartSec=3
KillSignal=SIGINT
+13 -10
View File
@@ -89,16 +89,19 @@ def check(root: Path, repair_known: bool = False) -> list[str]:
for doc_path in sorted(embedded_docs):
if not (root / doc_path).is_file():
raise ValueError(f"Missing embedded Reader document: {doc_path}; restore the file or remove its Reader registration")
# An included Rust source fragment cannot begin with an inner doc comment.
# Catch E0753 here so a source-only release does not ship an unbuildable
# admin module when a compiler is unavailable during packaging.
admin_mod = (root / "src/admin/mod.rs").read_text(encoding="utf-8")
if 'include!("dashboard_presets.rs");' in admin_mod:
fragment = root / "src/admin/dashboard_presets.rs"
if not fragment.is_file():
raise ValueError(f"Missing included module: {fragment.relative_to(root)}")
if fragment.read_text(encoding="utf-8").lstrip().startswith(("//!", "/*!")):
raise ValueError("src/admin/dashboard_presets.rs starts with an inner doc comment; use /// instead (Rust E0753)")
# Fragments inserted by include! cannot start with inner doc comments.
# Scan all Rust includes, not just an individual admin fragment (E0753).
for parent in (root / "src").rglob("*.rs"):
source = parent.read_text(encoding="utf-8")
for relative in re.findall(r'\binclude!\s*\(\s*"([^"\n]+\.rs)"\s*\)', source):
fragment = parent.parent / relative
if not fragment.is_file():
raise ValueError(f"Missing included Rust source: {fragment.relative_to(root)}")
if fragment.read_text(encoding="utf-8").lstrip().startswith(("//!", "/*!")):
raise ValueError(
f"{fragment.relative_to(root)} starts with an inner doc comment; "
"replace //! with // or /// (Rust E0753)"
)
text = (root / "src/lib.rs").read_text(encoding="utf-8")
if '#[path = "auth/mod.rs"]' not in text:
raise ValueError("src/lib.rs does not match the expected entry point; extract the complete package, not individual files.")