aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/mozart/Cargo.toml
AgeCommit message (Collapse)Author
2026-05-11chore(lint): add Ruby linter scripts and apply rulesnsfisis
Adds scripts/lint with linters for mod.rs naming, contiguous use blocks, use-as aliasing, sorted Cargo dependencies, std::collections maps, and workspace dependency requirements. Renames mod.rs files, reorders use statements, drops unnecessary import aliases, and sorts Cargo.toml entries to satisfy the new rules.
2026-05-10refactor(clippy): deny clippy::unused_trait_namesnsfisis
2026-05-10refactor(workspace): consolidate crates into mozart-corensfisis
Merged mozart-archiver, mozart-autoload, mozart-registry, mozart-sat-resolver, and mozart-vcs into mozart-core to align the source layout with Composer's structure. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-09refactor(console): accept format args directly in console_writeln! macrosnsfisis
Eliminate the nested &console_format!(...) boilerplate at every call site by teaching console_writeln!, console_write!, console_writeln_error!, and console_write_error! to accept a format literal + variadic args directly, matching the println!/eprintln! ergonomics. Propagate the format string span into generated code so rustc errors point to the right location. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-04feat(show): expand license output with name, OSI flag, and URLnsfisis
Mirror Composer's Command\ShowCommand::printLicenses(): emit one line per license identifier, expanded to "<full name> (<id>) [(OSI approved)] <url>" when the id is in the SPDX database, or just the id otherwise. The URL is built by mozart-spdx-licenses' new LicenseInfo::url() so the construction lives in the SPDX crate, like Composer's SpdxLicenses::getLicenseByIdentifier().
2026-05-03refactor: switch internal maps/sets from HashMap to IndexMapnsfisis
Adopt indexmap workspace-wide so iteration order is deterministic and follows insertion order. The non-deterministic order of std HashMap otherwise leaks into resolver decisions when multiple valid solutions exist (e.g. cyclic require pairs under prefer-lowest), making behavior flaky and divergent from Composer's PHP-array semantics. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01test(test-harness): enumerate Composer installer .test fixturesnsfisis
Add per-fixture #[test] entries (187 total) via a small declarative macro that reads files directly from the composer submodule. For now each test only asserts the file parses; execution and EXPECT-* checks will be layered on as the harness gains comparison helpers.
2026-02-23feat(vcs): add mozart-vcs crate for VCS repository supportnsfisis
Implement VCS driver/downloader infrastructure mirroring Composer's VCS subsystem. Includes drivers for GitHub, GitLab, Bitbucket, Forgejo, Git, Hg, and SVN with API-based metadata resolution, plus source downloaders for Git/Hg/SVN. Integrates into mozart-registry via vcs_bridge module to scan VCS repositories and feed discovered packages into the SAT resolver. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23fix(search): match Composer single-line output format with truncationnsfisis
Replace two-line output (name+counts, indented description) with Composer's single-line aligned format: padded name, abandoned warning, and terminal-width-aware description truncation. Remove summary header and download/faver count display from text output. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23fix(browse): use proper URL validation and match Composer's Windows browser ↵nsfisis
launch Replace simple prefix check in is_valid_url with url::Url::parse() for structural validation (e.g. "https://" with no host now correctly rejected). Update Windows open_browser to use `start "web" explorer` matching Composer's HomeCommand behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor: reorganize crates to match Composer subpackage structurensfisis
Rename mozart-constraint to mozart-semver (mirrors composer/semver) and extract mozart-class-map-generator from mozart-autoload (mirrors composer/class-map-generator). No logic changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor(async): migrate from blocking HTTP to async/await with tokionsfisis
Replace reqwest::blocking with async reqwest across the entire codebase. All command execute functions, registry API calls (packagist, downloader, resolver, lockfile), and the main entry point now use async/await with the tokio runtime. The pubgrub resolver runs on spawn_blocking since its DependencyProvider trait is synchronous, using Handle::block_on for async I/O within that context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22feat(tracing): add performance profiling via tracing cratensfisis
Wire up the existing --profile flag with tracing-subscriber to emit span timings on stderr. Supports MOZART_LOG env var override and verbose-level-aware filtering. No subscriber is installed when --profile is off, keeping tracing macros zero-cost. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22refactor(workspace): split monolithic crate into 6 workspace cratesnsfisis
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>
2026-02-21feat(completion): add shell completion generation via clap_completensfisis
Add a `completion` subcommand that generates shell completion scripts for Bash, Zsh, Fish, Elvish, and PowerShell using the clap_complete crate. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21test(cli): add end-to-end integration tests for CLI commandsnsfisis
Add 23 integration tests using assert_cmd and predicates covering about, validate, show, licenses, install, config, init, and dump-autoload commands with shared test helpers and fixture projects. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(self-update): implement command to update Mozart via GitHub Releasesnsfisis
Add full self-update functionality: fetch releases from GitHub API, download platform-specific binaries, atomically replace the running executable using self-replace, and support --rollback and --preview flags. Includes backup management and 12 unit tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(archive): implement command to create distributable archivesnsfisis
Add archive command supporting zip, tar, tar.gz, and tar.bz2 formats with .gitattributes export-ignore filtering, composer.json archive.exclude patterns, remote package archiving via Packagist, and self-exclusion to prevent archives from including themselves. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(cache): add filesystem-backed cache with TTL expiration and size-limited GCnsfisis
Implement a cache module with CacheConfig and Cache structs supporting read/write (string and binary), atomic writes via temp+rename, TTL-based expiration, and size-limited garbage collection. Wire the repo cache into packagist.rs and resolver.rs for API response caching, and the files cache into downloader.rs for dist archive caching. Implement the clear-cache command with full clear and --gc modes. All existing call sites pass None for backward compatibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(resolver): integrate pubgrub dependency resolvernsfisis
Add dependency resolution module using pubgrub v0.3.0 to convert Composer-style constraints into range-based version solving. Includes ComposerVersion type with stability ordering, MozartProvider implementing DependencyProvider, platform package handling, stability filtering, and conflict support via complement ranges. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(core): add version constraint, lockfile, installed registry, and ↵nsfisis
downloader modules Phase 1 infrastructure for the install command: - constraint: Composer-compatible version parsing and constraint matching (caret, tilde, wildcard, hyphen range, OR/AND combinators) - lockfile: composer.lock read/write with content-hash computation - installed: vendor/composer/installed.json registry (Composer 2.x format) - downloader: dist archive download with SHA-1 verification and zip/tar.gz extraction with top-level directory stripping Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-21feat(require): implement require command with Packagist version resolutionnsfisis
Add the require command that updates composer.json with new package dependencies. When no version constraint is specified, the best version is resolved from the Packagist p2 API based on minimum-stability. Includes packagist API client, version comparison/stability detection, and RawPackageData deserialization support for roundtrip editing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11add more dependenciesnsfisis
2026-02-11enable workspacensfisis