fix(perry-ui-gtk4): #1246 follow-up — restore image.rs resolve_asset_path access#1298
Merged
Merged
Conversation
…path access PR #1246 ("Drop all files to <2k LOC + tighten size gate") split `crates/perry-ui-gtk4/src/lib.rs` and moved `resolve_asset_path` into `ffi::layout`, leaving the function private. `widgets/image.rs:33` still calls `crate::resolve_asset_path(path)` — root-level — so the gtk4 build on the linux-aarch64-gnu release target broke with: error[E0425]: cannot find function `resolve_asset_path` in the crate root --> crates/perry-ui-gtk4/src/widgets/image.rs:33:27 | 33 | let resolved = crate::resolve_asset_path(path); | ^^^^^^^^^^^^^^^^^^ not found in the crate root | note: function `crate::ffi::layout::resolve_asset_path` exists but is inaccessible Local macOS builds didn't hit this because perry-ui-gtk4 is gated off on macOS workspace builds (gtk4 system-libs only ship on Linux). It surfaced on the v0.5.1020 release-packages run (#26249481496) when the `linux-aarch64-gnu` matrix entry tried to link perry-ui-gtk4 and failed the whole release pipeline (winget / homebrew / npm / apt / apt-repo all got skipped via fail-fast). Two-line fix: - `ffi::layout::resolve_asset_path`: `fn` → `pub(crate) fn` so neighbour modules can reuse the exact resolution rule without duplicating it. - `widgets::image::create_file`: `crate::resolve_asset_path(path)` → `crate::ffi::layout::resolve_asset_path(path)` to point at the new module path. Refs #1246. Unblocks v0.5.1020 release-packages re-tag.
c6d06a1 to
47d90f8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
crates/perry-ui-gtk4/src/lib.rsand movedresolve_asset_pathintoffi::layout, leaving the function private —widgets/image.rs:33still calledcrate::resolve_asset_path(path)(root path), so the gtk4 build broke on linux-aarch64-gnu in the v0.5.1020 release-packages run.ffi::layout::resolve_asset_pathpub(crate)and updated the image.rs call site to use the correct module path.Surfaced by
release-packages run #26249481496,
build (ubuntu-24.04-arm, aarch64-unknown-linux-gnu, perry-linux-aarch64). Fail-fast cascaded into 4 other matrix entries getting cancelled and all publish jobs (winget / homebrew / npm / apt / apt-repo) being skipped.Test plan
cargo fmt --all -- --checkcleancargo check -p perry-ui-gtk4clean locally