Skip to content

fix(perry-ui-gtk4): #1246 follow-up — restore image.rs resolve_asset_path access#1298

Merged
proggeramlug merged 1 commit into
mainfrom
fix/1246-gtk4-resolve-asset-path
May 22, 2026
Merged

fix(perry-ui-gtk4): #1246 follow-up — restore image.rs resolve_asset_path access#1298
proggeramlug merged 1 commit into
mainfrom
fix/1246-gtk4-resolve-asset-path

Conversation

@proggeramlug
Copy link
Copy Markdown
Contributor

Summary

  • PR Drop all files to <2k LOC + tighten size gate from 5k to 2k #1246 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 called crate::resolve_asset_path(path) (root path), so the gtk4 build broke on linux-aarch64-gnu in the v0.5.1020 release-packages run.
  • Made ffi::layout::resolve_asset_path pub(crate) and updated the image.rs call site to use the correct module path.
  • Local macOS workspace builds didn't catch this because perry-ui-gtk4 is excluded from macOS cargo-test (per CLAUDE.md).

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 -- --check clean
  • cargo check -p perry-ui-gtk4 clean locally
  • PR CI: lint + cargo-test + api-docs-drift + security-audit + harmonyos-smoke pass
  • After merge: re-tag v0.5.1021 → release-packages run goes all-green

…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.
@proggeramlug proggeramlug force-pushed the fix/1246-gtk4-resolve-asset-path branch from c6d06a1 to 47d90f8 Compare May 21, 2026 21:02
@proggeramlug proggeramlug merged commit f7aaed1 into main May 22, 2026
9 checks passed
@proggeramlug proggeramlug deleted the fix/1246-gtk4-resolve-asset-path branch May 22, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant