From 125a3ab7d88928cafd6d33cbe5020c615f37d65c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Mon, 29 Jun 2026 10:31:20 +0200 Subject: [PATCH 1/4] make hash workflow more robust --- .github/workflows/update-pnpm-hash.yaml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.github/workflows/update-pnpm-hash.yaml b/.github/workflows/update-pnpm-hash.yaml index 472b442c..53bcc51f 100644 --- a/.github/workflows/update-pnpm-hash.yaml +++ b/.github/workflows/update-pnpm-hash.yaml @@ -37,7 +37,6 @@ jobs: FAKE="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" SYSTEM=$(nix eval --impure --raw --expr 'builtins.currentSystem') - CHANGED=0 # Helper: extract the hash for a given attribute, swap in FAKE, # build it, capture the real hash, and write it back. @@ -84,30 +83,20 @@ jobs: # Write the correct hash back. sed -i "/^[[:space:]]*${attr} = fetchPnpmDeps/,/;[[:space:]]*\$/{s|hash = \"${FAKE}\"|hash = \"${NEW}\"|}" nix/package.nix - # Track whether anything changed. + # Track whether this hash changed. if [ "$CURRENT" != "$NEW" ]; then echo "${attr}_changed=true" >> "$GITHUB_OUTPUT" - CHANGED=1 else echo "${attr}_changed=false" >> "$GITHUB_OUTPUT" fi } - # ----- root pnpm-lock.yaml ----- - if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -qx 'pnpm-lock.yaml'; then - update_hash "pnpmDeps" "pnpm root" - fi - - # ----- new-ui/pnpm-lock.yaml ----- - if git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -qx 'new-ui/pnpm-lock.yaml'; then - update_hash "newUiPnpmDeps" "pnpm new-ui" - fi - - # If neither lockfile was actually modified, warn but don't fail - # (can happen when the PR touches both, then one is reverted). - if [ "$CHANGED" -eq 0 ]; then - echo "::warning::Workflow triggered but no lockfile changed relative to base." - fi + # Always attempt both hashes - the workflow trigger already ensures + # at least one lockfile was modified. The commit step below only + # fires when a hash actually changed, so there's no harm in + # computing both every time. + update_hash "pnpmDeps" "pnpm root" + update_hash "newUiPnpmDeps" "pnpm new-ui" - name: Commit updated hashes if: > From 76c61dfaf6c283038fb53359da34bfbb18106354 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Mon, 29 Jun 2026 10:32:04 +0200 Subject: [PATCH 2/4] update hash --- nix/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/package.nix b/nix/package.nix index 889c87e2..082b3fac 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -90,7 +90,7 @@ inherit pname version pnpm; src = ../.; fetcherVersion = 3; - hash = "sha256-WjcZeKfEEjcry5dJ12yL+dz+/v5CmKSg0iHfYcoOtag="; + hash = "sha256-D7yf3x7OAeM3Wdjgo8TxeSCNoLxN3IfgqTzRoBdBwhc="; }; # Prefetch pnpm dependencies for the new UI (separate pnpm project). @@ -99,7 +99,7 @@ inherit version pnpm; src = ../new-ui; fetcherVersion = 3; - hash = "sha256-baWUPm0kQqCpfPaKQ/XelD253ly/f2icuR/s/+6jVgE="; + hash = "sha256-yijiZxdKVpr5ZuZj1o3hqx5yhGgpUxicWwhE6h7xPsE="; }; # Pre-build the new UI frontend so Tauri can serve it as WebviewUrl::App("compact/") and "full/". From 68d237cd28d88823731ce9e622abbfd177ccb8a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Mon, 29 Jun 2026 12:56:54 +0200 Subject: [PATCH 3/4] update flake inputs --- flake.lock | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/flake.lock b/flake.lock index 224a07bd..5409c70d 100644 --- a/flake.lock +++ b/flake.lock @@ -14,11 +14,11 @@ }, "crane": { "locked": { - "lastModified": 1780532242, - "narHash": "sha256-D+BsdpxmtUwtqGoY0IXPhHgTlmqgcZKCEo1oMyn7ep0=", + "lastModified": 1781825982, + "narHash": "sha256-SlXKwIRIhrOSAcTjCB3ftPLzJWZStQIPS7J1FlZPnKk=", "owner": "ipetkov", "repo": "crane", - "rev": "59a82a1222dd3b2080b5cc52a1a2e8d5f1b77f37", + "rev": "469fd08d0bcf6926321fa973c6777fbc87785dd7", "type": "github" }, "original": { @@ -59,12 +59,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1781173989, - "narHash": "sha256-fnzKKPvS+oieI/pTzotA5tkoM47EB1NpaBcgk4R97hE=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "8c91a71d13451abc40eb9dae8910f972f979852f", - "type": "github" + "lastModified": 1782636521, + "narHash": "sha256-Yf2TcFLw0r574fP/5eUN6N8el70HbYNdbDeeHpnK2eQ=", + "rev": "e1c1b84752fb0897897380a3cae9dc7fcab91ca3", + "type": "tarball", + "url": "https://releases.nixos.org/nixpkgs/nixpkgs-26.11pre1023798.e1c1b84752fb/nixexprs.tar.xz" }, "original": { "id": "nixpkgs", @@ -115,11 +114,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1781234414, - "narHash": "sha256-HdA+P4fKRGOomkewnI/Tww5Wz4xK1O7+hDO90YAsPB4=", + "lastModified": 1782703273, + "narHash": "sha256-WJPfr9EAWVIuTMyb/ilHKUYlg/RNa0xrNiWR+p1iHUg=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "1d18bfe3de6244c641ca4e8011186d0981b81d76", + "rev": "5106a604b3d67cffe8eb51a8bd9f04e607f0d31d", "type": "github" }, "original": { From 97bd43b23248aa73171a6c476e8ec8634cdabe14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20W=C3=B3jcik?= Date: Mon, 29 Jun 2026 13:03:41 +0200 Subject: [PATCH 4/4] update hash again --- nix/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nix/package.nix b/nix/package.nix index 082b3fac..69b8c437 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -99,7 +99,7 @@ inherit version pnpm; src = ../new-ui; fetcherVersion = 3; - hash = "sha256-yijiZxdKVpr5ZuZj1o3hqx5yhGgpUxicWwhE6h7xPsE="; + hash = "sha256-N6YZ7COM99gtEBDFAKCPKWep52eY6ShxQYeJGDF/H38="; }; # Pre-build the new UI frontend so Tauri can serve it as WebviewUrl::App("compact/") and "full/".