Skip to content

chore: remove abandoned modular-architecture crates and dead contract modules#483

Open
RUKAYAT-CODER wants to merge 2 commits into
mainfrom
chore/remove-dead-modules-and-dedupe-exports
Open

chore: remove abandoned modular-architecture crates and dead contract modules#483
RUKAYAT-CODER wants to merge 2 commits into
mainfrom
chore/remove-dead-modules-and-dedupe-exports

Conversation

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Summary

  • Removes the 7 orphaned contracts/{insurance,licenses,market,marketplace,tokenization,governance,collaboration} crates. These are leftovers from a reverted modular-architecture experiment (376ae87, reverted in 76a8cac): none are Cargo workspace members, none are referenced anywhere, none are documented in CHANGELOG/TRACKING. Some (marketplace, tokenization, market) are written against the ink!/Substrate framework, not Soroban. contracts/market/src/lib.rs was a byte-identical copy of contracts/insurance/src/lib.rs.
  • Removes notification_events.rs and notification_events_simple.rs from teachlink - superseded drafts; lib.rs only ever compiled notification_events_basic.
  • Removes 10 more teachlink modules that were // mod'd out behind TODO: Fix ... compilation errors (pre-existing issue) comments with no tracked plan: collaboration, content_nft, content_quality, fractional, learning_paths, licensing, marketplace, royalty, social_events, social_learning. Checked open issues for each by name - zero matches. Left event_tests.rs / validation_tests.rs alone since those are disabled tests for currently-active modules (events, bridge, escrow, validation, etc.), not dead feature code, and left notification_tests.rs.disabled alone since TRACKING.md already tracks re-enabling it.
  • Dedupes the pub use types::{...} re-export block in lib.rs, which repeated ~55 of its ~100 identifiers twice within the same use statement.
  • Removes the unused testing/{performance,quality,analytics,security} scaffolding - confirmed via testing/Cargo.toml/testing/src/lib.rs that none of it is compiled; it duplicates the live scripts/*.sh + regression.yml gas/perf checks without ever being invoked.
  • Adds a check-added-large-files pre-commit hook so build artifacts can't be committed again.

No workspace members changed (only contracts/teachlink and contracts/documentation ever were), so this shouldn't affect build/test behavior beyond the removed modules no longer existing.

Test plan

  • cargo build --workspace
  • cargo test --workspace --lib
  • cargo clippy --workspace --all-features -- -D warnings
  • CI (ci.yml, regression.yml) green

…ktop-teachLink-contract/bb6b2c0c-69b2-43d6-ba37-ba3f90e13957/scratchpad/commit_msg.txt
…ktop-teachLink-contract/bb6b2c0c-69b2-43d6-ba37-ba3f90e13957/scratchpad/fmt_commit_msg.txt
@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor Author

Note on CI: the Code Quality & Format Checks job's clippy step is failing here, but it's a pre-existing issue, not something introduced by this PR. cargo fmt --check was already failing on main before this PR (confirmed on the latest main run: https://github.com/rinafcode/teachLink_contract/actions/runs/25311283087), which meant the clippy step after it never actually got to run in CI. This PR fixes the formatting, which unblocked clippy for the first time and surfaced real, pre-existing compile errors in feature_flags.rs, validation.rs, and score.rs (duplicate MAX_OPERATIONAL_TIMEOUT/MAX_TIME_SKEW consts, duplicate ScoreError/ScoreResult definitions, references to nonexistent BridgeError variants, and calls to nonexistent soroban-sdk methods). None of that is touched by this cleanup. Tracking the fix separately since it needs its own review.

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