Repository navigation
refactor: keep module roots to declarations and re-exports - #237
Merged
Merged
Conversation
missing_docs, unreachable_pub, unsafe_code and clippy::type_complexity levels moved from #![...] attributes in each crate's lib.rs to that crate's Cargo [lints] table, so lib.rs holds declarations only. Cargo lints cover every target of a package, including integration tests, so the test crates now carry a //! description, their planning fixtures document their public types and fields, the solver's shared test model moves to tests/support/scalar_model.rs (loaded with #[path] and #[allow(dead_code)] at each use) with pub(crate) items, and the projected_publication fixture domain moves into its own file to stay under 500 lines. AGENTS and the facade WIREFRAME describe where the levels live.
Seventeen mod.rs/lib.rs files held more than module declarations and use re-exports. Every item and inline module body now lives in its own file, with public paths and behaviour unchanged: - the solverforge facade modules (config, stats, domain, analysis, constraint, director, builder, heuristic, phase, console), the scoring stream::cross/chain/projected facades and the solver's hidden __bench and __private modules each get a file of the same name; - the configurable_solvable test domains move into their own directories; - the impl_arity_stream! dispatcher moves to arity_stream_macros/dispatch.rs, ListUndoJournal to heuristic/move/list_undo_journal.rs, the regret kernel's budgets and regret values to kernel/budgets.rs and kernel/choice.rs, and the descriptor and move test fixtures to fixtures.rs and snapshot_director.rs. AGENTS states the rule for every mod.rs and lib.rs, with planning_model! manifests and the proc-macro entry points as the only exceptions, and the WIREFRAMEs list the new files. Closes #234
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #234. Two commits: lint levels move to Cargo [lints] (with the test docs/fixtures those lints require), then every item and inline module body moves out of mod.rs/lib.rs. Evidence on 69d0457 (clean tree): syn module-root scan 0 files; make ci-local + make lint EXIT 0, 1725 tests passed, 0 failed, 116 result lines. First commit 569f5c9 checked on its own tree: fmt, clippy --all-targets --all-features -D warnings, file length, cargo test --workspace --all-features (1541 passed, 0 failed).