refactor(core): move model, view, workbook, format into improvise-core

Relocate the four pure-data module trees into the improvise-core
sub-crate scaffolded in the previous commit. Phase A already made
these modules UI/IO-free; this commit is purely mechanical:

  git mv src/format.rs   -> crates/improvise-core/src/format.rs
  git mv src/workbook.rs -> crates/improvise-core/src/workbook.rs
  git mv src/model       -> crates/improvise-core/src/model
  git mv src/view        -> crates/improvise-core/src/view

The moved code contains no path edits: the `crate::formula::*`,
`crate::model::*`, `crate::view::*`, `crate::workbook::*`,
`crate::format::*` imports inside the four trees all continue to
resolve because the new crate mirrors the same module layout and
re-exports improvise_formula under `formula` via its lib.rs.

Main-crate `src/lib.rs` flips from declaring these as owned modules
(`pub mod model;` etc.) to re-exporting them from improvise-core
(`pub use improvise_core::model;` etc.). This keeps every
`crate::model::*`, `crate::view::*`, `crate::workbook::*`,
`crate::format::*` path inside the 26 consumer files in src/ (ui,
command, persistence, import, draw, main) resolving unchanged — no
downstream edits needed.

Verification:
- cargo check --workspace: clean
- cargo test --workspace: 612 passing (357 main + 190 core + 65 formula)
- cargo clippy --workspace --tests: clean
- cargo build -p improvise-core: standalone build succeeds, confirming
  zero UI/IO leakage into the core crate

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Edward Langley
2026-04-15 22:31:42 -07:00
parent 0d75c7bd0b
commit fc9d9cb52a
13 changed files with 11 additions and 5 deletions

View File

@ -2,5 +2,11 @@
//! and number formatting. Depends on `improvise-formula` for AST types;
//! has no awareness of UI, I/O, or commands.
//!
//! Scaffolded empty in this commit; the modules land in the next commit.
//! Re-exports `improvise_formula` under `formula` so internal code can use
//! `crate::formula::*` paths, mirroring the main crate's convention.
pub use improvise_formula as formula;
pub mod format;
pub mod model;
pub mod view;
pub mod workbook;

View File

@ -1,10 +1,10 @@
pub mod command;
pub mod draw;
pub mod format;
pub use improvise_core::format;
pub use improvise_formula as formula;
pub mod import;
pub mod model;
pub use improvise_core::model;
pub mod persistence;
pub mod ui;
pub mod view;
pub mod workbook;
pub use improvise_core::view;
pub use improvise_core::workbook;