aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/installer/installer_interface.rs
AgeCommit message (Collapse)Author
2026-06-20refactor(installation-manager): cache installers by index, drop clone_boxnsfisis
InstallationManager::get_installer cached a per-type installer via a Rust-only `clone_box` stub (`todo!()`). PHP caches the SAME instance held in `$this->installers`. Store the index into `installers` instead, reproducing that sharing without cloning; both `add_installer` and `remove_installer` clear the cache, so indices never dangle. With the only caller gone, `InstallerInterface::clone_box` is removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07feat(shirabe): resolve phase-b TODOs with shared ownershipnsfisis
Replace TODO(phase-b) placeholders (todo!() and commented-out code) with real implementations: - Share JsonFile via Rc<RefCell<JsonFile>> so JsonConfigSource and the owning command can hold the same instance (base_config_command, config_command, repository_command, require_command, create_project, remove_command, factory) - Change InstallerInterface methods (is_installed, download, prepare, cleanup, get_install_path) to &mut self so initialize_vendor_dir can run, propagated to all installer implementations - Pass io/config/filesystem/process by clone instead of moving or stubbing (auth_helper, svn_driver, curl_downloader, library_installer) - Make TransportException Clone and store it by value in VcsRepository - Clone operations in Transaction sort, root_aliases/temporary_constraints in RepositorySet::create_pool, and share CompletePackage via handle in PlatformRepository - Wire up set_option, set_requires/set_dev_requires, installation manager setters, BumpCommand::set_composer, and clean_backups/set_local_phar
2026-06-05feat(installer): wire InstallerInterface marker-trait downcastsnsfisis
Add as_binary_presence_interface and as_plugin_installer_mut to InstallerInterface following the downloader marker-trait downcast pattern, so InstallationManager can model the PHP instanceof checks in ensureBinariesPresence and disablePlugins. Make BinaryPresenceInterface take &mut self, resolving LibraryInstaller's stubbed trait impl. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-27refactor(package): pass package handles by value throughoutnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25refactor(package): introduce Rc<RefCell<_>> handles for packagesnsfisis
PHP packages have reference semantics, so introduce shared-ownership handles over an AnyPackage enum (PackageInterfaceHandle and friends) and replace Box<dyn PackageInterface> throughout. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23refactor(promise): drop \React\Promisensfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23refactor(promise): change functions returning PromiseInterface to async fnnsfisis
2026-05-20refactor: re-export module items to shorten import pathsnsfisis
2026-05-19fix(compile): fix more random compile errorsnsfisis
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19fix(compile): fix various compile errorsnsfisis
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17chore(style): cargo fmtnsfisis
2026-05-15feat(port): port NoopInstaller.phpnsfisis
2026-05-12feat(init): add scaffold filesnsfisis