build: re-enable -Werror for Squirrel-owned targets#300
Merged
Conversation
0b71b24 to
cf64963
Compare
54b6e92 to
5295339
Compare
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
cf64963 to
9305ce9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #299.
-Werrorwas 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=NOoverride has to stay (ReactiveObjC'sRACTestScheduler.mstill trips-Wimplicit-int-float-conversion), and CLI overrides win over all project/target settings. So instead of fighting that, setOTHER_CFLAGS = -Werrorat the Squirrel project level — CLI doesn't touchOTHER_CFLAGS, and it only propagates to our five targets, not the vendor xcodeprojs. Also flipped the project-levelGCC_TREAT_WARNINGS_AS_ERRORSback toYESfor builds that bypassscript/test.Real fixes
SQRLShipItRequest.m/SQRLUpdaterSpec.m:+JSONDictionaryFromModel:→:error:SQRLUpdate.m:+reversibleTransformerWithForwardBlock:reverseBlock:→+transformerUsingForwardBlock:reverseBlock:SQRLDownloadedUpdate.m: dropped dead+JSONKeyPathsByPropertyKeyreturningNSNull.null(would assert under Mantle 2; class isn't<MTLJSONSerializing>)TestApplication-Info.plist:LSApplicationCategoryTypePragma
QuickSpec+SQRLFixtures.m:SMJobRemove(test cleanup only;SMAppServicerequires 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@availablebranching that keeps the deprecated path anyway. Separate PRs (or a deployment-target bump) handle these.