Repository navigation
Dependencies: take craft-libs main at 23acc70493 - #4127
Conversation
craft-update moves from storytold/craft-libs at 1b34eba41 to 6e03f65bf, craft-libs main with the update fixes from storytold#763 and storytold#803. Cargo.lock records the new revision. The other craft-libs pins are unchanged.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
FredApps
left a comment
There was a problem hiding this comment.
Reviewed current head 5a06556. No actionable regression found in this dependency integration. Only craft-update changes source; the egui feature and exact package version are preserved, and the lockfile adds the expected rustix edge without moving other craft-libs packages.
The shared craft-update source review covered eligibility/preflight, release-link binding, exclusive staging and tar bounds, macOS failure handling, and retry/download retention. Verified successful Linux and Windows gates plus Nix evaluation for this head; there are no unresolved review threads. I did not run a new local build or exercise an installed application's self-update, so validation relies on the recorded CI rather than a claimed local runtime pass.
FredApps
left a comment
There was a problem hiding this comment.
This supersedes my earlier approval after tracing the updater call through this application's UI integration.
[P2] Keep the new installation-tree preflight off the UI thread. crates/ui-egui/src/dialogs/updates_ui.rs:104 calls Updater::tick on the UI update path. At the new craft-libs pin, completion calls finish_check → open_offer → StartupPrompt::new → is_self_updating → current_at → can_replace_all → can_replace_share. That newly added preflight recursively performs canonicalize/read_dir/metadata calls through the installed share trees (up to 4096 entries per tree). The entry cap does not bound filesystem latency: a standalone Linux/macOS installation with share directories or links on a slow/stalled mount can freeze the application when a newer release is discovered, before the prompt is drawn.
Please move this eligibility inspection onto the update-check worker and pass the result to prompt construction, then consume that corrected dependency revision here. Add coverage proving delayed eligibility inspection does not block UI ticks. Source: https://github.com/storytold/craft-libs/blob/6e03f65bf45181db77ba6229716e6624db9eb25b/crates/update/src/self_update.rs#L321-L331 and https://github.com/storytold/craft-libs/blob/6e03f65bf45181db77ba6229716e6624db9eb25b/crates/update/src/updater.rs#L462-L467 .
Current CI remains green; this is a source-traced responsiveness defect, not a claimed runtime reproduction. No new local build was run.
|
@FredApps The install check that walks the installed files moves from |
craft-libs e98299546 includes storytold#923: the check of whether the copy can install itself now runs on the update-check thread instead of in Updater::tick on the UI thread.
|
@FredApps ecc3a58 repins |
skylartaylor
left a comment
There was a problem hiding this comment.
Re-checked at 0572ce25, at the pin it moves to (e98299546).
The frame no longer walks the installation tree. Whether this copy can install a found release itself is read inside the check thread and travels with the answer (craft-libs crates/update/src/updater.rs:395-409, can_install_itself at :88-92), and the prompt is built from that answer through StartupPrompt::with_self_update (:227-239, dialog.rs:57-68), so a stalled share tree now delays the answer, not a frame. a_stalled_install_inspection_does_not_block_a_frame (updater.rs:1016-1061) holds the inspection open, ticks once with no prompt and the check still running, then asserts the frame inspected the install exactly once. The pinned revision contains craft-libs#923's merge commit 47b6bbad.
LightCraft's own call is unchanged (crates/ui-egui/src/dialogs/updates_ui.rs:104 calls tick), and its only Updater::offer call is in a test (:200), so the calling-thread inspection that remains in offer is not on a frame here. I read this at both revisions rather than building it; gate and gate-Windows are green on this head.
One thing outside this change: the launcher's pins file is still read on the calling thread when a check starts and when it finishes (updater.rs:388-391, and read_choice from finish_check). It is one small file, not the tree walk, so I would not put it in this PR.
Approving.
Dismissing as stale: the install-tree preflight is off the UI frame at the pinned craft-libs e98299546 (this PR's ecc3a582, containing craft-libs#923 47b6bbad): the check thread computes eligibility (crates/update/src/updater.rs:395-409) and the prompt takes that answer (:227-239), with a_stalled_install_inspection_does_not_block_a_frame (:1016-1061) as the coverage he asked for.
Every craft-libs crate in the workspace moves to craft-libs main at 3af2280ee3, so the app builds against one craft-libs commit. - crates/codecs: the separate craft-avif-encode alias of craft-image-codecs is removed. With both on one commit, cargo refuses the same package under two names. On native targets the avif feature now enables craft-image-codecs' avif and threads features, so a build without avif, and the wasm32 build, still leave the AV1 encoder out. - crates/ui-egui: GroupLocation has two new fields, flyout_width and flyout_offset (storytold/craft-libs#627); the default dock location sets both to None, as craft-ui does for a new group.
Every craft-libs crate moves from 3af2280ee3 to craft-libs main at 3af718585c. craft-image-codecs now depends on the new craft-dds crate.
|
|
cargo-sources.json now lists the craft-libs git sources that Cargo.lock locks: one commit, 3af718585c, for every craft-libs crate, and the new craft-dds crate. It was generated with ./packaging/linux/flatpak/generate-cargo-sources.py.
|
Correction to my earlier comment: The test line in the body now gives the 26 failures of the full run in its count. |
skylartaylor
left a comment
There was a problem hiding this comment.
App-side integration looks good at 45582d1a (craft-libs 3af718585c).
The installation-tree inspection still runs on the update-check worker; updater.rs is unchanged from the previously reviewed pin. The AVIF alias cleanup uses the same shared encoder implementation, including its threading feature and EXIF/HDR handling. The two new docking fields use the shared crate’s automatic defaults.
The regenerated Flatpak inventory now names the locked craft-libs revision and craft-dds. I checked the resulting inventory; the generator’s repeatability is from your report, not a run of mine.
The named Linux and Windows gates passed for this PR revision, and there are no unresolved review threads. I did not run a new local build or exercise an installed self-update or Flatpak build.
Every craft-libs crate moves from 3af718585c to craft-libs main at 453b0da782. Cargo.lock changes only the craft-libs source lines, and packaging/linux/flatpak/cargo-sources.json is regenerated with generate-cargo-sources.py for the new commit. craft-update now reads the installed files for a release the app offers on a thread of its own, and the prompt opens at a later tick (storytold/craft-libs#1149). startup_prompt_shows_and_closes offered a release and checked the prompt after one frame, so it failed when that thread had not answered yet. The test now waits for the thread's repaint request and ticks until the prompt opens.
|
Pushed two commits:
The branch merges cleanly with |
The offer's thread sends its answer before it asks for a repaint, so the tick after that repaint reads the answer. The helper now ticks once after the repaint and asserts that the prompt is open, instead of waiting for another repaint that never comes when the answer opens no prompt. The test also gives its updater a pins file that does not exist, so a launcher choice on the machine running the tests does not stop the offer.
|
Pushed
|
|
@coderabbitai The title check reads an older summary. At |
|
Tip For best results, initiate chat on the files or code changes. Analysis chain
The title matches the change. The saved title warning used an older summary, so I withdraw the recommendation to change the title. I have not rerun the check. You are interacting with an AI system. |
|
|
Every craft-libs crate moves to craft-libs main at 23acc70493, which contains each commit main pins. main's separate copies of craft-image-codecs (craft-webp-header, craft-bmp-header, craft-image-codecs-sef and craft-avif-encode) become the one craft-image-codecs dependency, and the codecs `avif` feature enables its `avif-decode` feature as main does. Cargo.lock and packaging/linux/flatpak/cargo-sources.json are regenerated.
|
|
Problem
mainpins its craft-libs crates at eighteen different commits, andcrates/codecstakes craft-image-codecs under five names (craft-image-codecs,craft-webp-header,craft-bmp-header,craft-image-codecs-sefandcraft-avif-encode), each at its own commit. Fixes merged into craft-libs since those commits do not reach LightCraft.Change
Every craft-libs crate in the workspace moves to craft-libs main at
23acc70493, which contains every commitmainpins.Cargo.lockchanges only craft-libs entries: their source lines and dependency lists, one craft-image-codecs and one craft-cms instead of several, and thecraft-ddscrate that craft-image-codecs depends on.packaging/linux/flatpak/cargo-sources.jsonis regenerated withgenerate-cargo-sources.pyfor the new commit.mainatb5400289is merged in;craft-heifkeepsmain'sdefault-features = false.Code changes that follow from the single commit:
crates/codecs: cargo refuses the same package under two names once both are on one commit, so the four aliases of craft-image-codecs are removed.sniff.rs,webp.rsandjpeg.rscallbmp_probe,webp_probeandjpeg_sefthroughcraft_image_codecs. The native target table enables craft-image-codecs'avifandthreadsfeatures as an optional dependency of theaviffeature, which also enablesavif-decodeas onmain, so a native build withoutavif, and the wasm32 build, still leave the AV1 encoder out.encode_avifusesshared_imageagain.crates/ui-egui/src/docking.rs: craft-ui'sGroupLocationhas two new fields,flyout_widthandflyout_offset(ui: resize iconic flyouts from their free edges craft-libs#627). The default dock location sets both toNone, as craft-ui does for a new group.crates/ui-egui/src/dialogs/updates_ui.rs: craft-update reads the installed files for an offered release on a thread of its own, and the prompt opens at a later tick (update: inspect a release the app offers on its own thread, not in offer craft-libs#1149).startup_prompt_shows_and_closeschecked the prompt one frame after the offer and failed when that thread had not answered yet. The test now waits for the thread's repaint request, ticks once and asserts that the prompt is open, and reads launcher choices from a pins file that does not exist.Merged craft-libs pull requests that this brings to code LightCraft calls:
Updater::tickreads no installed file. LightCraft callsUpdater::tickevery frame (crates/ui-egui/src/dialogs/updates_ui.rs:104).cropthrough (crates/raw/src/convert.rs:152and:177). Related to Canon CR2 files: cropping not applied on import #3313.craft_raw::decode.How it was checked
CI runs the full gate. On a Linux build host at
ba830c2c:cargo fmt --all -- --checkpasses.cargo check --workspace --testspasses.cargo clippy --workspace --all-targets --locked -- -D warningsandcargo clippy -p lightcraft-codecs --all-targets --locked --features heif -- -D warningspass.cargo test -p lightcraft-codecs --locked: 4 test binaries, 166 passed, 1 ignored.generate-cargo-sources.pyrun twice on thisCargo.lockgave byte-identical files.At
df73fdf3(craft-libs453b0da782),cargo test -p lightcraft-ui-egui --lib --lockedgave 1,936 passed, 4 ignored, andcargo test -p lightcraft-ui-egui --lib updates_uigave 3 passed at2f105bdc. craft-update has no changes between453b0da782and23acc70493.