Skip to content

Conversation

Saadnajmi
Copy link
Collaborator

@Saadnajmi Saadnajmi commented Dec 22, 2022

Summary

Our "Integration CI" was failing, because some clang warnings (nullability-completeness) started being treated as errors. This got fixed by react-native-test-app ignoring that warning (microsoft/react-native-test-app#1259) but we should still fix the warnings in our repo.

This change fixes a lot of compiler warnings, including:

  • Add Nullability completeness macros to RCTUIKit and other places
  • Change the param of some eventDispatcher arguments from RCTEventDispatcher to id<RCTEventDispatcherProtocol
  • Switch some #define uses into typedef uses
  • Incorrect casts to RCTUIView instead of RCTPlatformView
  • Remove a redefinition of the NSView opaque property that Xcode warned about
    • opaque is readwrite on UIView, but readonly on macOS. t looks like we were trying to change the readonly property into a readwrite with an override, but Xcode told us it would ignore our definition and auto synthesize the base definition. So I removed our attempted override, and moved calls of self.opaque = NO to iOS only ifdefs. End result should be the same compiled code, but less warnings.

Changelog

[INTERNAL] [FIXED] - Fixed many compiler warnings

Test Plan

CI passes.

@Saadnajmi Saadnajmi requested a review from a team as a code owner December 22, 2022 19:14
@analysis-bot
Copy link

analysis-bot commented Dec 22, 2022

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: e948c79
Branch: main

@Saadnajmi Saadnajmi changed the title [Draft] fix Integration CI Update Integration CI to 0.68 Dec 30, 2022
@Saadnajmi
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@Saadnajmi Saadnajmi changed the title Update Integration CI to 0.68 Fix Integration CI Jan 3, 2023
@Saadnajmi Saadnajmi changed the title Fix Integration CI Fix many compiler warnings Jan 10, 2023
@Saadnajmi Saadnajmi enabled auto-merge (squash) January 10, 2023 03:04
@Saadnajmi Saadnajmi merged commit ccc088f into microsoft:main Jan 10, 2023
@Saadnajmi Saadnajmi deleted the fix-integration branch January 10, 2023 04:08
shwanton pushed a commit to shwanton/react-native-macos that referenced this pull request Feb 13, 2023
* Bump to 68

* Add audited regions

* Fix some more warnings

* More nonnull

* don't audit fabric types

* Audit just the macOS Fabric regions

* Add to RCTSlider

* More warning fixes

* More warning fixes

* Fix up opaque

* Remove override of opaque
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.

3 participants