diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-02-22 00:37:54 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-02-22 00:37:54 +0900 |
| commit | 0a8e5935e6305819bb02d8c69e2f046ff397913a (patch) | |
| tree | e5a288e679477b1603d7989e986ca22bbe590aa4 /crates/mozart/src/lockfile.rs | |
| parent | b5af594fec7da72b15c9a202c641af0494db6355 (diff) | |
| download | php-mozart-0a8e5935e6305819bb02d8c69e2f046ff397913a.tar.gz php-mozart-0a8e5935e6305819bb02d8c69e2f046ff397913a.tar.zst php-mozart-0a8e5935e6305819bb02d8c69e2f046ff397913a.zip | |
refactor(workspace): split monolithic crate into 6 workspace crates
Extract modules from the single `mozart` crate into 5 focused library
crates to improve compilation parallelism and architectural clarity:
- mozart-constraint: version constraint parser (independent)
- mozart-core: base types, console, validation, platform utilities
- mozart-archiver: archive creation (tar, zip, bzip2)
- mozart-registry: Packagist API, cache, resolver, downloader, lockfile
- mozart-autoload: autoloader generation and PHP scanner
Refactor Console::from_cli and build_cache_config to accept primitive
args instead of &Cli to break circular dependencies. Introduce
[workspace.dependencies] for centralized version management. Remove 9
unused direct dependencies from the CLI crate.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates/mozart/src/lockfile.rs')
| -rw-r--r-- | crates/mozart/src/lockfile.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/mozart/src/lockfile.rs b/crates/mozart/src/lockfile.rs index 4742772..3a13778 100644 --- a/crates/mozart/src/lockfile.rs +++ b/crates/mozart/src/lockfile.rs @@ -1,7 +1,7 @@ -use crate::cache::Cache; -use crate::package::{RawPackageData, to_json_pretty}; -use crate::packagist::{self, PackagistDist, PackagistSource, PackagistVersion}; -use crate::resolver::ResolvedPackage; +use mozart_registry::cache::Cache; +use mozart_core::package::{RawPackageData, to_json_pretty}; +use mozart_registry::packagist::{self, PackagistDist, PackagistSource, PackagistVersion}; +use mozart_registry::resolver::ResolvedPackage; use serde::{Deserialize, Serialize}; use std::collections::{BTreeMap, HashMap, HashSet, VecDeque}; use std::fs; @@ -613,13 +613,13 @@ mod tests { replace: BTreeMap::new(), provide: BTreeMap::new(), conflict: BTreeMap::new(), - dist: Some(crate::packagist::PackagistDist { + dist: Some(mozart_registry::packagist::PackagistDist { dist_type: "zip".to_string(), url: format!("https://example.com/{version}.zip"), reference: Some("deadbeef".to_string()), shasum: Some("abc123".to_string()), }), - source: Some(crate::packagist::PackagistSource { + source: Some(mozart_registry::packagist::PackagistSource { source_type: "git".to_string(), url: "https://github.com/example/pkg.git".to_string(), reference: Some("deadbeef".to_string()), @@ -1012,9 +1012,9 @@ mod tests { #[test] #[ignore] fn test_generate_lock_file_monolog() { - use crate::package::Stability; - use crate::resolver::PlatformConfig; - use crate::resolver::{ResolveRequest, resolve}; + use mozart_core::package::Stability; + use mozart_registry::resolver::PlatformConfig; + use mozart_registry::resolver::{ResolveRequest, resolve}; // Resolve monolog/monolog ^3.0 let resolve_request = ResolveRequest { |
