Skip to content

refactor(opy-compiler): remove dead compile_source entry and CompileError - #50

Merged
Teakowa merged 1 commit into
mainfrom
entropy/opy-compiler-dead-entry
Aug 22, 2026
Merged

refactor(opy-compiler): remove dead compile_source entry and CompileError#50
Teakowa merged 1 commit into
mainfrom
entropy/opy-compiler-dead-entry

Conversation

@Teakowa

@Teakowa Teakowa commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Entropy-audit cut (2026-08-22 audit, candidate 1, Risk B): removes the
never-used source convenience entry point from opy-compiler.

  • Compiler::compile_source + CompileError — zero callers repo-wide
    (including every other WrightKit repository; no cross-repo consumer
    exists). The crate's own tests deliberately bypass it
    (opy_frontend::compile(...) + compiler.compile_hir(&hir)), so the
    advertised front door was never executed anywhere, and CompileError
    existed only as its return type with no readers.
  • CompilationArtifact::link_report field — write-only; tests read the
    same fact through the unchanged Compiler::link_report() accessor, which
    stays.

Nothing else in the crate's surface changes: compile_hir,
cross_check_manifest, LinkReport, IntegrationDiagnostic,
IntegrationError, WORKSHOP_RS_VERSION, and CompilationArtifact's
remaining fields are untouched.

Tradeoff

A one-step "source in, artifact out" convenience is lost. It was an
untested promise rather than a capability; reintroduce it together with a
real consumer (e.g. a future compile CLI) so it is actually exercised.

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets --all-features -- -D warnings
  • cargo test --workspace --all-targets --all-features (all suites green)
  • python3 -m unittest discover -s compatibility/tests (20 tests OK)
  • rg compile_source|CompileError over the repo, docs, and compatibility
    data: zero stale references

…rror

compile_source had zero callers repo-wide (the crate's own tests bypass
it via opy_frontend::compile + compile_hir), so it was an untested
front door. Its only product, CompileError, had no readers either.
CompilationArtifact::link_report was write-only; tests use the
Compiler::link_report() accessor, which is unchanged.

Entropy audit candidate 1 (Risk B): cut the never-validated
convenience surface instead of keeping it as a false promise; reintroduce
with a real consumer when one exists.
@Teakowa
Teakowa merged commit eee8255 into main Aug 22, 2026
4 checks passed
@Teakowa
Teakowa deleted the entropy/opy-compiler-dead-entry branch August 22, 2026 06:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant