Skip to content

Hotfix/fix update on intel mac#105

Closed
hAmpzter wants to merge 2 commits into
st0012:masterfrom
hAmpzter:hotfix/fix-update-on-intel-mac
Closed

Hotfix/fix update on intel mac#105
hAmpzter wants to merge 2 commits into
st0012:masterfrom
hAmpzter:hotfix/fix-update-on-intel-mac

Conversation

@hAmpzter

@hAmpzter hAmpzter commented May 9, 2026

Copy link
Copy Markdown
Contributor

This is a fix for the issue with auto-update for #104 I hope.

I had difficulties trying to validate this.

@st0012

st0012 commented May 9, 2026

Copy link
Copy Markdown
Owner

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ab7cd672fa

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread appcast.xml
@@ -11,6 +11,14 @@
<sparkle:minimumSystemVersion>13.0</sparkle:minimumSystemVersion>
<sparkle:hardwareRequirements>arm64</sparkle:hardwareRequirements>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Avoid relying on Sparkle 2.9-only filtering

This feed now depends on sparkle:hardwareRequirements to make Intel clients skip the first 0.15.2 item, but the app still pins Sparkle 2.8.1 in menubar/CctopMenubar.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved lines 17-20, and Sparkle documents this element as added in 2.9. Current Intel installations therefore won't understand the new restriction and can still select the first/latest arm64 item before reaching the x86_64 item, so the hotfix does not actually protect the affected clients unless Sparkle is upgraded first or the appcast is split/ordered in a 2.8-compatible way.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’d treat that review as partly valid, but overstated.

The compatibility concern is fair because the previous verification did not actually compile the app against Sparkle 2.8.1, and it leaned partly on
current Sparkle docs, which may reflect newer Sparkle behavior. So the answer “yes, it works” was stronger than the evidence supported.

That said, the specific Sparkle APIs in SparkleUpdater.swift do look compatible with Sparkle 2.x, including 2.8.1: SPUStandardUpdaterController,
SPUUpdaterDelegate, SPUUserUpdateChoice, and automaticallyDownloadsUpdates are not the risky part.

The more important question is the appcast behavior:

  • Sparkle appcast update selection is item-based.
  • sparkle:hardwareRequirements is an SUAppcastItem property, not an enclosure-level property.
  • So splitting arm64 and x86_64 into separate same-version entries is conceptually right.
  • The arm64 item must be first, because Apple Silicon can technically run x86_64 apps under Rosetta, and we want Sparkle to pick the native arm64 item
    when both are otherwise applicable.

The current appcast shape:

... 0.15.2 ... arm64 ... 0.15.2 ...

looks reasonable for Sparkle 2.8.1.

What I would not claim without more evidence is “definitely works end to end.” To close that properly, run a real Xcode build with the resolved
package and ideally test update selection from an Intel machine or x86_64 runtime. The strongest local verification would be:

xcodebuild -resolvePackageDependencies -project menubar/CctopMenubar.xcodeproj
xcodebuild build -project menubar/CctopMenubar.xcodeproj -scheme CctopMenubar -configuration Debug -derivedDataPath menubar/build
CODE_SIGN_IDENTITY="-"
./scripts/validate-appcast.sh

So: the review comment is correct to question the confidence level, but I don’t see evidence that the fix is actually incompatible with Sparkle 2.8.1.

Sources checked: Sparkle SUAppcastItem docs show hardwareRequirements is item-level, and Sparkle SPUStandardUpdaterController docs show the updater
APIs used by the app exist in Sparkle 2.x.
https://sparkle-project.org/documentation/api-reference/Classes/SUAppcastItem.html
https://sparkle-project.github.io/documentation/api-reference/Classes/SPUStandardUpdaterController.html

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I coded this thing with Codex and from what I can see in their documentation when I let Codex also check the review comment it seems like the item has support for that in Sparkle 2.8.1.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at sparkle-project/Sparkle#2797, I don't think it's supported in v2.8.1.
So for this to work properly, we should also bump sparkle to v2.9.0+

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, I totally missed that the documentation (https://sparkle-project.org/documentation/api-reference/Classes/SUAppcastItem.html) says "Sparkle 2.9.1 Docs".
I was looking for something like "Added in ...." where the element but thought it had been there forever as it was nothing like that pointed out.

Do you think it would be any worries about upgrading to 2.9.1 ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like maybe a good idea is to have two different xml-files for <= 2.9 and >= 2.9 as it might break update in older versions. Though as it is an xml I feel it should just ignore things xml-tags it does not understand.
But maybe make a appcast29.xml or something like that for the future apps for a while? Or do you have statistics on app versions in the wild @st0012 ?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How can it break older versions?

@st0012 st0012 added the bug Something isn't working label May 12, 2026
@st0012

st0012 commented May 12, 2026

Copy link
Copy Markdown
Owner

@hAmpzter I really appreciate you opening the issue and the PR. I'll merge and release #106 now, which is built on top of this but with a new more changes.

@st0012 st0012 closed this May 12, 2026
@st0012

st0012 commented May 12, 2026

Copy link
Copy Markdown
Owner

The fix is out. But I'm not sure when I'll have another release to properly test it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants