From 072fcd3a98b25b0a66fbc087c7690a1123298ffc Mon Sep 17 00:00:00 2001 From: kirillDevPro <113171057+kirillDevPro@users.noreply.github.com> Date: Wed, 28 Oct 2026 06:02:28 +0100 Subject: [PATCH 1/2] docs(patch-queue): drop the nonexistent --local flag from the regeneration command What was stale: the regeneration command in docs/MOON_PATCH_QUEUE.md passed `--local` to `cargo xtask transform`. The Transform subcommand defines only --zed-tag, --zed-path, --output and --versioned-deps, so clap rejects the documented command with "unexpected argument '--local'" (exit 2). What the code does now: path dependencies are the default (main.rs passes `!versioned_deps` as `use_local_deps`); `--versioned-deps` opts into version dependencies. The doc now says so. Verified: `cargo xtask transform --help` lists no --local, and running the command with --local exits 2 before touching any directory. Reviewer: Codex (all three changed claims confirmed against main.rs, transform.rs and transform/manifest.rs). Other documents read today and current: crates/moon-gpui/README.md, crates/moon-ui-gallery/README.md. --- docs/MOON_PATCH_QUEUE.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/MOON_PATCH_QUEUE.md b/docs/MOON_PATCH_QUEUE.md index 237368d..66e2f71 100644 --- a/docs/MOON_PATCH_QUEUE.md +++ b/docs/MOON_PATCH_QUEUE.md @@ -16,9 +16,12 @@ generated tree. Regeneration command: ```powershell -cargo xtask transform --zed-tag v0.0.0 --zed-path R:\test\_zed_gpui_base_84b753 --output crates --local +cargo xtask transform --zed-tag v0.0.0 --zed-path R:\test\_zed_gpui_base_84b753 --output crates ``` +The generated crates use path dependencies by default; `--versioned-deps` +switches them to version dependencies for publish-style output. + ## Patch Layers On `master` 0. Standalone extraction hygiene on `upstream-clean`: From 62154574c2215edbc913c0a0dfc4d5dadc97cce3 Mon Sep 17 00:00:00 2001 From: kirillDevPro <113171057+kirillDevPro@users.noreply.github.com> Date: Wed, 28 Oct 2026 06:07:12 +0100 Subject: [PATCH 2/2] docs(refineable): say the generated is_some reports any field set Found by the hunt lane in moon-refineable / its derive macro. Input: a refinement generated by #[derive(Refineable)] in which only one field (here one field of a nested #[refineable] refinement) is set. Documented result: the generated `Refinement::is_some` doc comment said "Returns `true` if all fields are `Some`", so it should return false. Actual result: it returns true; the body returns on the first field whose `is_some()` is true. The code, not the comment, is what callers depend on: `Style::text_style` (moon-gpui/src/style.rs) returns the text refinement whenever `self.text.is_some()`, so a style that overrides only the text colour keeps it; with the documented "all fields" meaning that override would be discarded. The macro's own Debug impl uses the same presence meaning for nested refinements. So the doc comment is corrected and no behaviour changes. Proof: a throwaway integration probe in crates/moon-refineable/tests (deleted, not committed) asserted the documented meaning and failed on origin/master at 11caff6 ("is_some returned true with only one nested field set"). Re-run: derive a two-level refinement, set one nested field, call is_some(). Checks: cargo fmt --all, cargo clippy and cargo test for moon-derive-refineable and moon-refineable, cargo check -p moon-gpui. Reviewer: Codex (no findings; confirmed the text matches the generated body and that Style::text_style and the generated Debug rely on it). --- crates/moon-derive-refineable/src/derive_refineable.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/moon-derive-refineable/src/derive_refineable.rs b/crates/moon-derive-refineable/src/derive_refineable.rs index c7c8a91..0cf42ef 100644 --- a/crates/moon-derive-refineable/src/derive_refineable.rs +++ b/crates/moon-derive-refineable/src/derive_refineable.rs @@ -487,7 +487,8 @@ pub fn derive_refineable(input: TokenStream) -> TokenStream { impl #impl_generics #refinement_ident #ty_generics #where_clause { - /// Returns `true` if all fields are `Some` + /// Returns `true` if any field is set: a plain field holds `Some`, or a nested + /// refinement field has any field set. pub fn is_some(&self) -> bool { #( if self.#field_names.is_some() {