aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/util
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-22 04:19:14 +0900
committernsfisis <nsfisis@gmail.com>2026-05-22 04:19:25 +0900
commit2a1696906344cb4da768a940bf8b1f89bbc82b47 (patch)
tree9e37f93baaa9858037ab3a25b13a676f07ccb3a9 /crates/shirabe/src/util
parent6739da8a8e271a82d1bf8ca79bba58640ae6e743 (diff)
downloadphp-shirabe-2a1696906344cb4da768a940bf8b1f89bbc82b47.tar.gz
php-shirabe-2a1696906344cb4da768a940bf8b1f89bbc82b47.tar.zst
php-shirabe-2a1696906344cb4da768a940bf8b1f89bbc82b47.zip
refactor: share Pool via Rc<RefCell>
Convert Pool to Rc<RefCell<Pool>> so Solver, Decisions, and RuleSetGenerator share it, resolving the todo!() placeholders that blocked the dependency resolver (Phase C shared ownership). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/util')
-rw-r--r--crates/shirabe/src/util/git.rs14
-rw-r--r--crates/shirabe/src/util/http_downloader.rs4
-rw-r--r--crates/shirabe/src/util/perforce.rs2
3 files changed, 10 insertions, 10 deletions
diff --git a/crates/shirabe/src/util/git.rs b/crates/shirabe/src/util/git.rs
index d8e11d9..f1b71f9 100644
--- a/crates/shirabe/src/util/git.rs
+++ b/crates/shirabe/src/util/git.rs
@@ -387,8 +387,8 @@ impl Git {
if !self.io.has_authentication(&m1) {
let mut git_hub_util = GitHub::new(
self.io.clone_box(),
- std::rc::Rc::clone(&self.config),
- Some(std::rc::Rc::clone(&self.process)),
+ self.config.clone(),
+ Some(self.process.clone()),
self.http_downloader.clone(),
)?;
let message = "Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos";
@@ -449,8 +449,8 @@ impl Git {
// bitbucket either through oauth or app password, with fallback to ssh.
let mut bitbucket_util = Bitbucket::new(
self.io.clone_box(),
- std::rc::Rc::clone(&self.config),
- Some(std::rc::Rc::clone(&self.process)),
+ self.config.clone(),
+ Some(self.process.clone()),
self.http_downloader.clone(),
None,
)?;
@@ -614,8 +614,8 @@ impl Git {
if !self.io.has_authentication(&m2) {
let mut git_lab_util = GitLab::new(
self.io.clone_box(),
- std::rc::Rc::clone(&self.config),
- Some(std::rc::Rc::clone(&self.process)),
+ self.config.clone(),
+ Some(self.process.clone()),
self.http_downloader.clone(),
)?;
let message =
@@ -768,7 +768,7 @@ impl Git {
self.io
.set_authentication(m2.clone(), username, Some(password));
let mut auth_helper =
- AuthHelper::new(self.io.clone_box(), std::rc::Rc::clone(&self.config));
+ AuthHelper::new(self.io.clone_box(), self.config.clone());
let store_auth_enum = match &store_auth {
PhpMixed::String(s) if s == "prompt" => StoreAuth::Prompt,
PhpMixed::Bool(b) => StoreAuth::Bool(*b),
diff --git a/crates/shirabe/src/util/http_downloader.rs b/crates/shirabe/src/util/http_downloader.rs
index b5a4923..3072df2 100644
--- a/crates/shirabe/src/util/http_downloader.rs
+++ b/crates/shirabe/src/util/http_downloader.rs
@@ -124,7 +124,7 @@ impl HttpDownloader {
let curl = if Self::is_curl_enabled() {
Some(CurlDownloader::new(
io.clone_box(),
- std::rc::Rc::clone(&config),
+ config.clone(),
options.clone(),
disable_tls,
))
@@ -134,7 +134,7 @@ impl HttpDownloader {
let rfs = Some(RemoteFilesystem::new(
io.clone_box(),
- std::rc::Rc::clone(&config),
+ config.clone(),
options.clone(),
disable_tls,
None,
diff --git a/crates/shirabe/src/util/perforce.rs b/crates/shirabe/src/util/perforce.rs
index 9c68cc9..10c426f 100644
--- a/crates/shirabe/src/util/perforce.rs
+++ b/crates/shirabe/src/util/perforce.rs
@@ -829,7 +829,7 @@ impl Perforce {
pub fn get_filesystem(&mut self) -> &std::rc::Rc<std::cell::RefCell<Filesystem>> {
if self.filesystem.is_none() {
self.filesystem = Some(std::rc::Rc::new(std::cell::RefCell::new(Filesystem::new(
- Some(std::rc::Rc::clone(&self.process)),
+ Some(self.process.clone()),
))));
}