Skip to content

fix: add explicit JSON property mappings for SQRLShipItRequest model - #49980

Merged
VerteDinde merged 2 commits into
electron:mainfrom
nmggithub:fix-squirrel-updates
Mar 3, 2026
Merged

VerteDinde merged 2 commits into
electron:mainfrom
nmggithub:fix-squirrel-updates

Conversation

@nmggithub

@nmggithub nmggithub commented Feb 28, 2026 •

Copy link
Copy Markdown
Contributor

Description of Change

This should resolve #49977. As per #49978, we may defer this for 42.

As posited in the original issue, #38437 is the change that broke this. To walk through the root cause and my proposed fix:

  1. We were previously pinned to Mantle/Mantle@78d3966 (February 15, 2016, on the 1.x-maintenance branch).
  2. We then updated to Mantle/Mantle@2a8e212 (October 18, 2022, on the master branch).
  3. This brought us forward, but also effectively moved us from Mantle v1 to v2. In v2, implicit property mapping was removed, and models now have to explicitly define properties in +JSONKeyPathsByPropertyKey.
  4. Squirrel.Mac currently returns an empty dictionary in +JSONKeyPathsByPropertyKey, which worked under v1 but no longer works under v2.
  5. The resulting behavior of the above in v2 is that, when SQRLShipItRequest calls [super initWithDictionary:error:], an empty dictionary is returned (with no properties, since Mantle is unaware of any of them). This then trips the validation checks later in that method.
  6. This PR includes a patch for Squirrel.Mac to explicitly define the expected properties in +JSONKeyPathsByPropertyKey.

I expect this to work, but I have not fully tested it end-to-end as I lack a good reproduction setup for this specific update flow. Any help on that front would be greatly appreciated.

Additionally, as mentioned above, I'm ok with deferring this to 42 if need be.

Checklist

Release Notes

Notes: Fixed dependency issue that caused Squirrel.Mac updates to fail.

@nmggithub
nmggithub requested a review from a team as a code owner February 28, 2026 05:55
@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label Feb 28, 2026
@VerteDinde VerteDinde added no-backport semver/patch backwards-compatible bug fixes labels Mar 2, 2026
@electron-cation electron-cation Bot added new-pr 🌱 PR opened recently and removed new-pr 🌱 PR opened recently labels Mar 2, 2026
@VerteDinde
VerteDinde merged commit 0ae46d7 into electron:main Mar 3, 2026
60 checks passed
@release-clerk

release-clerk Bot commented Mar 3, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed dependency issue that caused Squirrel.Mac updates to fail.

@dsanders11

Copy link
Copy Markdown
Member

Nice analysis, thanks @nmggithub!

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

Labels

no-backport semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Mantle update breaks Squirrel update deserialization in SQRLShipItRequest

3 participants