Skip to content

build: align Mantle and ReactiveObjC with Electron's pinned versions#298

Merged
MarshallOfSound merged 1 commit into
mainfrom
sam/deps-align-electron
May 2, 2026
Merged

build: align Mantle and ReactiveObjC with Electron's pinned versions#298
MarshallOfSound merged 1 commit into
mainfrom
sam/deps-align-electron

Conversation

@MarshallOfSound

Copy link
Copy Markdown
Collaborator

Swap the 2015-era Carthage pins for the exact deps Electron builds against (DEPS):

before after
Reactive ReactiveCocoa v2.5 (32364b9) ReactiveObjC @ 74ab5ba
Mantle 1.5.8 (78d3966) 2a8e212 (≈2.2.0+19)

Project / workspace

  • Carthage/Checkouts/ReactiveCocoa submodule removed → ReactiveObjC added
  • Mantle submodule bumped
  • ReactiveCocoa.frameworkReactiveObjC.framework everywhere in pbxproj
  • ShipIt target now links Mantle.framework + ReactiveObjC.framework instead of inline-compiling 60+ vendor .m files (drops the mtl_*=rac_* symbol-aliasing hack)
  • 59+59 dangling PBXBuildFile/PBXFileReference entries scrubbed

Source

  • <ReactiveCocoa/X.h><ReactiveObjC/X.h> across Squirrel/, SquirrelTests/, TestApplication/
  • SQRLShipItRequest.m: +JSONKeyPathsByPropertyKey lists all properties (Mantle 2 requires explicit — port of Electron's fix_add_explicit_json_property_mappings_for_shipit_request_model.patch)
  • SQRLZipArchiver.m: success path returns [RACSignal return:self] so ARC doesn't dealloc the archiver before NSTask fires (port of Electron's fix_ensure_that_self_is_retained_until_the_racsignal_is_complete.patch — required under ReactiveObjC + modern clang)
  • TestAppDelegate.m: (RACSignal *) cast for ReactiveObjC generics

Build

  • OTHER_CODE_SIGN_FLAGS=--timestamp=none in script/test + workflow (Mantle 2's vendored xcconfigs set --digest-algorithm=sha1 which modern codesign rejects)

56/56 tests pass.

Note

Once Electron bumps squirrel.mac_version past this commit, fix_add_explicit_json_property_mappings…, fix_ensure_that_self_is_retained…, and the import-rewrite hunks in build_add_gn_config.patch become no-ops in electron/patches/squirrel.mac/.

Replace ReactiveCocoa 2.5 with ReactiveObjC @ 74ab5ba and bump Mantle
1.5.8 -> 2.2.0+19 (2a8e212), matching what Electron actually builds via
GN + DEPS.

Submodules / workspace
- Carthage/Checkouts/ReactiveCocoa removed; ReactiveObjC added
- Cartfile / Cartfile.resolved / .gitmodules updated
- Workspace points at ReactiveObjC.xcodeproj

Imports
- <ReactiveCocoa/...> -> <ReactiveObjC/...> across Squirrel/,
  SquirrelTests/ and TestApplication/
- Bare "EXTScope.h" / "EXTKeyPathCoding.h" -> framework imports

ShipIt target
- ReactiveObjC sources use framework-style imports internally, so the
  old approach of inline-compiling RAC + Mantle .m files into ShipIt
  no longer works. ShipIt now links Mantle.framework and
  ReactiveObjC.framework (same as Electron's GN build) with rpath
  @executable_path/../../../.. so it can find them next to
  Squirrel.framework. Inline compile sources, the
  mtl_*=rac_* preprocessor symbol-aliasing hack, and the dep header
  search paths are dropped.

API drift absorbed
- SQRLShipItRequest +JSONKeyPathsByPropertyKey now lists every property
  (Mantle 2 requires explicit mappings; matches Electron's existing
  patch for the same)
- SQRLZipArchiver retains self through the success path so modern
  clang/ARC doesn't dealloc it before the task fires (matches
  Electron's existing patch for the same)
- TestAppDelegate: explicit RACSignal* cast for ReactiveObjC's generic
  +interval: return type
- Mantle 2 deprecations (JSONDictionaryFromModel:,
  MTLURLValueTransformerName, reversibleTransformerWithForwardBlock:)
  are left as-is and compile via the deprecated shims

Build
- OTHER_CODE_SIGN_FLAGS=--timestamp=none added to script/test and the
  CI workflow Build step; Mantle 2's vendored xcconfigs set
  --digest-algorithm=sha1 in Debug, which modern codesign rejects
@MarshallOfSound MarshallOfSound merged commit 70a530a into main May 2, 2026
1 check passed
@MarshallOfSound MarshallOfSound deleted the sam/deps-align-electron branch May 2, 2026 22:41
MarshallOfSound added a commit that referenced this pull request May 2, 2026
…hs (#299)

Stacked on #298.

Fills gaps between this suite and
`electron/spec/api-autoupdater-darwin-spec.ts` for behaviors that
already exist in `Squirrel/` source. **56 → 63 tests, 0 failures.**

#### Added (`SQRLUpdaterSpec.m`)
- `checkForUpdatesCommand` → 204 No Content treated as no-update
- `checkForUpdatesCommand` → custom request headers reach the server
- `checkForUpdatesCommand` JSONFILE mode → picks matching release's
`updateTo` when `currentRelease` is newer
- `checkForUpdatesCommand` JSONFILE mode → no download when
`currentRelease` == running version
- `checkForUpdatesCommand` JSONFILE mode → no download when
`currentRelease` < running version
- `checkForUpdatesCommand` JSONFILE mode → invalid body →
`SQRLUpdaterErrorInvalidServerBody`
- `response handling` → download endpoint non-2xx → error

Also re-enables the `SQUIRREL_TEST_LOCAL_CDN` / `_SERVER` scheme env
vars (dropped in the #297 squash).

#### Skipped (blocked on patch upstream — separate PRs incoming)
- `ElectronSquirrelPreventDowngrades` (4 specs)
- prune orphaned staged updates / bounded count / `quitAndInstall` race
- `SquirrelMacEnableDirectContentsWrite`
- abort-if-app-still-running
- nested-code strict-validate failures
- zip-extract launch failure
MarshallOfSound added a commit that referenced this pull request May 2, 2026
Stacked on #299.

`-Werror` was disabled project-wide in #296 to unblock the vendored
ReactiveCocoa 2.5 build. With #298 we control the warning surface again,
so turn it back on for our targets and fix what's left. **63/63 tests,
zero warnings in Squirrel-owned code.**

#### Mechanism
The CLI `GCC_TREAT_WARNINGS_AS_ERRORS=NO` override has to stay
(ReactiveObjC's `RACTestScheduler.m` still trips
`-Wimplicit-int-float-conversion`), and CLI overrides win over *all*
project/target settings. So instead of fighting that, set `OTHER_CFLAGS
= -Werror` at the Squirrel project level — CLI doesn't touch
`OTHER_CFLAGS`, and it only propagates to our five targets, not the
vendor xcodeprojs. Also flipped the project-level
`GCC_TREAT_WARNINGS_AS_ERRORS` back to `YES` for builds that bypass
`script/test`.

#### Real fixes
- `SQRLShipItRequest.m` / `SQRLUpdaterSpec.m`:
`+JSONDictionaryFromModel:` → `:error:`
- `SQRLUpdate.m`: `+reversibleTransformerWithForwardBlock:reverseBlock:`
→ `+transformerUsingForwardBlock:reverseBlock:`
- `SQRLDownloadedUpdate.m`: dropped dead `+JSONKeyPathsByPropertyKey`
returning `NSNull.null` (would assert under Mantle 2; class isn't
`<MTLJSONSerializing>`)
- `TestApplication-Info.plist`: `LSApplicationCategoryType`

#### Pragma
- `QuickSpec+SQRLFixtures.m`: `SMJobRemove` (test cleanup only;
`SMAppService` requires registering via the same API)

#### Punted
- `UTTypeConformsTo` / `launchApplicationAtURL` — neither warns at
deployment target 10.13. The replacements are 11.0+/10.15+ only, so a
real fix needs `@available` branching that keeps the deprecated path
anyway. Separate PRs (or a deployment-target bump) handle these.
This was referenced May 2, 2026
MarshallOfSound added a commit to electron/electron that referenced this pull request May 13, 2026
Bumps squirrel.mac from 0e5d146ba1 to 8d808803bc and removes 14 patches
that have been upstreamed into Squirrel/Squirrel.Mac (mainly via
Squirrel/Squirrel.Mac#312, plus Squirrel/Squirrel.Mac#298,
Squirrel/Squirrel.Mac#302, Squirrel/Squirrel.Mac#308). Only
build_add_gn_config.patch remains, slimmed down to GN-only changes
since Squirrel/Squirrel.Mac#298 upstreamed the ReactiveCocoa ->
ReactiveObjC import renames it was carrying.
jkleinsc pushed a commit to electron/electron that referenced this pull request May 14, 2026
* fix: don't return a `nullptr` from `TargetForRect`

Co-authored-by: Noah Gregory <nmggithub@electronjs.org>

* fix: address concerns

Co-authored-by: Noah Gregory <nmggithub@electronjs.org>

* chore: use promise's context for memory dump callback. (#51570)

Co-authored-by: BILL SHEN <15865969+cucbin@users.noreply.github.com>

* build: only fallback to CHROMIUM_BUILDTOOLS_PATH if needed (#51558)

* build: only fallback to CHROMIUM_BUILDTOOLS_PATH if needed

* ci: fix lint workflow detection of src/buildtools

* ci: bump build-tools SHA

Co-authored-by: David Sanders <dsanders11@ucsbalum.com>

* build: update squirrel.mac to 8d808803, drop upstreamed patches (#51584)

Bumps squirrel.mac from 0e5d146ba1 to 8d808803bc and removes 14 patches
that have been upstreamed into Squirrel/Squirrel.Mac (mainly via
Squirrel/Squirrel.Mac#312, plus Squirrel/Squirrel.Mac#298,
Squirrel/Squirrel.Mac#302, Squirrel/Squirrel.Mac#308). Only
build_add_gn_config.patch remains, slimmed down to GN-only changes
since Squirrel/Squirrel.Mac#298 upstreamed the ReactiveCocoa ->
ReactiveObjC import renames it was carrying.

Co-authored-by: Samuel Attard <sam@electronjs.org>

* Revert "build: update squirrel.mac to 8d808803, drop upstreamed patches (#51584)"

This reverts commit d4e9004.

* Revert "build: only fallback to CHROMIUM_BUILDTOOLS_PATH if needed (#51558)"

This reverts commit 090b568.

* Revert "chore: use promise's context for memory dump callback. (#51570)"

This reverts commit a74d8a1.

---------

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Noah Gregory <nmggithub@electronjs.org>
Co-authored-by: BILL SHEN <15865969+cucbin@users.noreply.github.com>
Co-authored-by: David Sanders <dsanders11@ucsbalum.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
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