Skip to content

build: re-enable -Werror for Squirrel-owned targets#300

Merged
MarshallOfSound merged 1 commit into
mainfrom
sam/reenable-werror
May 2, 2026
Merged

build: re-enable -Werror for Squirrel-owned targets#300
MarshallOfSound merged 1 commit into
mainfrom
sam/reenable-werror

Conversation

@MarshallOfSound
Copy link
Copy Markdown
Collaborator

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.

@MarshallOfSound MarshallOfSound force-pushed the sam/expand-test-coverage branch from 54b6e92 to 5295339 Compare May 2, 2026 22:42
Base automatically changed from sam/expand-test-coverage to main May 2, 2026 22:47
Warnings-as-errors was disabled in #296 to let vendored ReactiveCocoa
build under modern clang. Now that the Mantle 2 / ReactiveObjC migration
is done, restore it for our own code.

The CLI override (GCC_TREAT_WARNINGS_AS_ERRORS=NO) has to stay so the
vendor projects in the workspace still build, and CLI overrides win over
target-level settings, so re-introduce -Werror via OTHER_CFLAGS at the
project level instead. That setting isn't touched by the CLI and only
applies to targets in this project.

Warning fixes:

- SQRLShipItRequest, SQRLUpdaterSpec: migrate to
  +[MTLJSONAdapter JSONDictionaryFromModel:error:]
- SQRLUpdate: migrate to
  +[MTLValueTransformer transformerUsingForwardBlock:reverseBlock:]
  with the new (value, success, error) block signature
- SQRLDownloadedUpdate: drop dead +JSONKeyPathsByPropertyKey (the class
  is not <MTLJSONSerializing>; the NSNull entry would assert under
  Mantle 2 if it were ever reached)
- QuickSpec+SQRLFixtures: pragma around SMJobRemove in test cleanup
  (no in-process replacement; SMAppService requires same-API
  registration)

Noise suppressed:

- DISABLE_MANUAL_TARGET_ORDER_BUILD_WARNING (we set
  parallelizeBuildables=NO deliberately)
- LSApplicationCategoryType for TestApplication
@MarshallOfSound MarshallOfSound merged commit 17e0e06 into main May 2, 2026
1 check passed
@MarshallOfSound MarshallOfSound deleted the sam/reenable-werror branch May 2, 2026 22:51
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