diff options
Diffstat (limited to 'crates/shirabe/src/util')
| -rw-r--r-- | crates/shirabe/src/util/filesystem.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/src/util/http/curl_downloader.rs | 10 | ||||
| -rw-r--r-- | crates/shirabe/src/util/http_downloader.rs | 2 | ||||
| -rw-r--r-- | crates/shirabe/src/util/loop.rs | 4 | ||||
| -rw-r--r-- | crates/shirabe/src/util/process_executor.rs | 2 | ||||
| -rw-r--r-- | crates/shirabe/src/util/remote_filesystem.rs | 10 | ||||
| -rw-r--r-- | crates/shirabe/src/util/sync_executor.rs | 2 |
7 files changed, 17 insertions, 17 deletions
diff --git a/crates/shirabe/src/util/filesystem.rs b/crates/shirabe/src/util/filesystem.rs index 2db41238..6cb33385 100644 --- a/crates/shirabe/src/util/filesystem.rs +++ b/crates/shirabe/src/util/filesystem.rs @@ -118,7 +118,7 @@ impl Filesystem { /// Uses the process component if proc_open is enabled on the PHP /// installation. pub fn remove_directory(&mut self, directory: impl AsRef<Path>) -> anyhow::Result<bool> { - // TODO(phase-c): + // TODO(bytes): // This path is matched against a regex (remove_edge_cases) and passed to an // `rm -rf`/`rmdir` subprocess via the String-based ProcessExecutor, so it has to be // representable as UTF-8. @@ -487,7 +487,7 @@ impl Filesystem { return Ok(()); } - // TODO(phase-c): + // TODO(bytes): // The fallbacks below (copy_then_remove and the mv/xcopy subprocesses) operate on // path strings, so beyond this point the paths have to be representable as UTF-8. let source = source.to_str().ok_or_else(|| { diff --git a/crates/shirabe/src/util/http/curl_downloader.rs b/crates/shirabe/src/util/http/curl_downloader.rs index bd77f75e..ff59266e 100644 --- a/crates/shirabe/src/util/http/curl_downloader.rs +++ b/crates/shirabe/src/util/http/curl_downloader.rs @@ -11,7 +11,7 @@ //! is preserved. Per-request TLS/proxy/IP-resolve settings that reqwest only exposes per-Client //! are simplified to a single default Client; see the TODOs below. //! -//! TODO(phase-c): `abortRequest()` (PHP `CurlDownloader::abortRequest`, called from +//! TODO(async): `abortRequest()` (PHP `CurlDownloader::abortRequest`, called from //! `HttpDownloader.php:275` when a React\Promise consumer cancels a download) has no equivalent //! here: shirabe has never ported the Promise/canceler machinery (`HttpDownloader::STATUS_ABORTED` //! is likewise unused), and there is no job table left to cancel now that `download()` runs to @@ -76,9 +76,9 @@ impl CurlDownloader { // - cookie_store(true) ~ CURL_LOCK_DATA_COOKIE // - redirect(none) ~ CURLOPT_FOLLOWLOCATION = false (we follow manually) // The libcurl version-specific multiplexing / accept-encoding workarounds are not needed. - // TODO(phase-e): a brand-new reqwest client is created per CurlDownloader; that is acceptable here + // TODO(http): a brand-new reqwest client is created per CurlDownloader; that is acceptable here // (one HttpDownloader owns one CurlDownloader) but not pooled across them. - // TODO(phase-c): cookie sharing (CURL_LOCK_DATA_COOKIE) would need reqwest's `cookies` feature + // TODO(http): cookie sharing (CURL_LOCK_DATA_COOKIE) would need reqwest's `cookies` feature // (.cookie_store(true)); omitted as it is not required for package downloads. let client = reqwest::Client::builder() .pool_max_idle_per_host(8) @@ -493,10 +493,10 @@ impl CurlDownloader { .and_then(|v| v.as_int()) .map(|n| n as u64); - // TODO(phase-c): per-request ssl (cafile/verify_peer/local_cert) and proxy settings are reqwest + // TODO(http): per-request ssl (cafile/verify_peer/local_cert) and proxy settings are reqwest // Client-level, not request-level. They are not applied here yet; a ConnectionOptions-keyed // Client cache (as in the design sketch) is required to honor them. - // TODO(phase-c): CURLOPT_IPRESOLVE (force IPv4/IPv6) has no direct reqwest API. + // TODO(http): CURLOPT_IPRESOLVE (force IPv4/IPv6) has no direct reqwest API. let _ = attributes; let reqwest_method = diff --git a/crates/shirabe/src/util/http_downloader.rs b/crates/shirabe/src/util/http_downloader.rs index 0aa589ca..c8fb943b 100644 --- a/crates/shirabe/src/util/http_downloader.rs +++ b/crates/shirabe/src/util/http_downloader.rs @@ -475,7 +475,7 @@ impl HttpDownloader { http_map.insert("follow_location".to_string(), PhpMixed::Bool(false)); http_map.insert("ignore_errors".to_string(), PhpMixed::Bool(true)); ctx_options.insert("http".to_string(), PhpMixed::Array(http_map)); - // TODO(phase-c): file_get_contents only takes a path; the stream context arg is dropped + // TODO(http): file_get_contents only takes a path; the stream context arg is dropped // until the PHP stream-context layer is modeled. let _ = stream_context_create(&ctx_options, None); let test_connectivity = file_get_contents("https://8.8.8.8"); diff --git a/crates/shirabe/src/util/loop.rs b/crates/shirabe/src/util/loop.rs index 5d2845c1..dccf5325 100644 --- a/crates/shirabe/src/util/loop.rs +++ b/crates/shirabe/src/util/loop.rs @@ -49,7 +49,7 @@ impl Loop { let mut pending: FuturesUnordered<_> = promises.into_iter().collect(); let mut uncaught: Option<anyhow::Error> = None; - // TODO(phase-c): promises are now polled concurrently via FuturesUnordered, but + // TODO(async): promises are now polled concurrently via FuturesUnordered, but // each individual future (HttpDownloader::add/add_copy etc.) still resolves through a // blocking bridge (curl_runtime()/sync_executor::block_on), so real I/O overlap does not // happen yet — the bridged future fully blocks the thread until it settles before the next @@ -67,7 +67,7 @@ impl Loop { } pub fn abort_jobs(&self) { - // TODO(phase-c): no-op until a cancellation mechanism is introduced. PHP cancels + // TODO(async): no-op until a cancellation mechanism is introduced. PHP cancels // every in-flight promise group it tracks in $currentPromises; reintroduce that tracking // once the asynchronous workers support cancellation on a multi-thread runtime. } diff --git a/crates/shirabe/src/util/process_executor.rs b/crates/shirabe/src/util/process_executor.rs index 4808d0be..3f300317 100644 --- a/crates/shirabe/src/util/process_executor.rs +++ b/crates/shirabe/src/util/process_executor.rs @@ -161,7 +161,7 @@ impl ProcessExecutor { /// Forwards to `execute`, returning the status code (1 on Err for compatibility) — this /// mirrors PHP call sites that check the `int` return of `execute()` without a surrounding /// `try`/`catch`, where an uncaught mock-mismatch exception would otherwise propagate. - // TODO(phase-d): under a strict `ProcessExecutorMock`, an incomplete expectation list now + // TODO(mock): under a strict `ProcessExecutorMock`, an incomplete expectation list now // surfaces here as a swallowed "exit code 1" instead of the old `panic!`, so a future test // ported through this call site could silently take a wrong branch instead of failing loudly. // `ProcessExecutorMockGuard::__assert_complete` still catches unconsumed expectations at diff --git a/crates/shirabe/src/util/remote_filesystem.rs b/crates/shirabe/src/util/remote_filesystem.rs index 28edb65c..ce24e39a 100644 --- a/crates/shirabe/src/util/remote_filesystem.rs +++ b/crates/shirabe/src/util/remote_filesystem.rs @@ -315,7 +315,7 @@ impl RemoteFilesystem { let mut error_message = String::new(); let error_code = 0_i64; let mut result: Option<String> = None; - // TODO(phase-c): PHP captures file_get_contents warnings here via set_error_handler. Rust + // TODO(http): PHP captures file_get_contents warnings here via set_error_handler. Rust // reports I/O failures through return values rather than warnings, so error_message stays // empty until get_remote_contents surfaces a read reason. let mut http_response_header: Vec<String> = Vec::new(); @@ -617,7 +617,7 @@ impl RemoteFilesystem { .into()); } - // TODO(phase-c): PHP captures the file_put_contents warning here via set_error_handler + // TODO(php-semantics): PHP captures the file_put_contents warning here via set_error_handler // (see the get() reads above); Rust reports the failure through the return value, so // put_error_message stays empty until file_put_contents surfaces a write reason. let put_error_message = String::new(); @@ -738,7 +738,7 @@ impl RemoteFilesystem { None => file_get_contents(file_url), }) } else { - // TODO(phase-c): wrap PHP's `file_get_contents` with stream context and error capture + // TODO(http): wrap PHP's `file_get_contents` with stream context and error capture // for http(s) and other network schemes; depends on the unmodeled PHP stream-context // layer. Ok(None) @@ -764,7 +764,7 @@ impl RemoteFilesystem { *response_headers = http_get_last_response_headers().unwrap_or_default(); http_clear_last_response_headers(); } else { - // TODO(phase-c): read the magic `$http_response_header` PHP variable; depends on the + // TODO(http): read the magic `$http_response_header` PHP variable; depends on the // unmodeled PHP stream layer that populates it. *response_headers = Vec::new(); } @@ -1040,7 +1040,7 @@ impl RemoteFilesystem { let decoded = zlib_decode(result.as_deref().unwrap_or("").as_bytes()); result = match decoded { - // TODO(phase-e): byte-string semantics — the response body travels through + // TODO(bytes): byte-string semantics — the response body travels through // RemoteFilesystem as a String; from_utf8_lossy can corrupt binary payloads Some(d) => Some(String::from_utf8_lossy(&d).into_owned()), None => { diff --git a/crates/shirabe/src/util/sync_executor.rs b/crates/shirabe/src/util/sync_executor.rs index 8ba45bd2..f770c6a2 100644 --- a/crates/shirabe/src/util/sync_executor.rs +++ b/crates/shirabe/src/util/sync_executor.rs @@ -16,7 +16,7 @@ //! case — and for any other call site reached before `main.rs`'s runtime exists — `block_on` falls //! back to a disposable single-threaded runtime scoped to just that one call. //! -//! TODO(phase-e): this still leaves every one of `block_on`'s call sites synchronous rather than +//! TODO(async): this still leaves every one of `block_on`'s call sites synchronous rather than //! genuinely `async fn` propagated up to `Command::execute`, which remains the end goal of the //! async re-architecture (see the design doc). Nested `block_on` call sites (a sync fn reached //! from inside another `block_on`'s async block) do not run concurrently with their siblings — |
