Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reland "Build iOS unittest target in unopt builds" (#44356)"" (#45346)" #45519

Merged
merged 3 commits into from
Sep 12, 2023

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Sep 6, 2023

Reland #44821

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@cyanglaz cyanglaz force-pushed the reland_unittest branch 2 times, most recently from 4e4a48e to 9c7fcd8 Compare September 8, 2023 18:46
@cyanglaz cyanglaz marked this pull request as ready for review September 8, 2023 18:46
@cyanglaz
Copy link
Contributor Author

cyanglaz commented Sep 8, 2023

@stuartmorgan Could you help me review the clang-tidy error fixes in Objective-C?

.ci.yaml Outdated
@@ -393,7 +393,7 @@ targets:

- name: Mac mac_clang_tidy
recipe: engine_v2/engine_v2
presubmit: false
presubmit: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert before committing.

…lutter#44356)"" (flutter#45346)"

This reverts commit ca513c9.

fix 1

fix

fix

temp ci change

fix name space

fix

fix

fix

format

revert

fix

draft

fix unittest

fix

fromat

eof line
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, but mostly it all looks good. It does seem to be flagging one more failure though.

@@ -18,9 +18,12 @@

namespace {
API_AVAILABLE(ios(13.4))
// NOLINTNEXTLINE(readability-identifier-naming)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do want to suppress this rather than fix the naming?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. There is actually a constant for it, I removed this declaration.

@@ -130,6 +130,7 @@ - (void)testReleasesProjectOnDealloc {
__weak FlutterDartProject* weakProject;
@autoreleasepool {
FlutterDartProject* mockProject = OCMClassMock([FlutterDartProject class]);
// NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just XCTAssertNotNil(group) instead of doing this?

@@ -130,6 +130,7 @@ - (void)testReleasesProjectOnDealloc {
__weak FlutterDartProject* weakProject;
@autoreleasepool {
FlutterDartProject* mockProject = OCMClassMock([FlutterDartProject class]);
// NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just XCTAssertNotNil(group) instead of doing this?

@@ -1575,6 +1575,7 @@ - (void)testWillDeallocNotification {
[[XCTestExpectation alloc] initWithDescription:@"notification called"];
id engine = [[MockEngine alloc] init];
@autoreleasepool {
// NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly we could assert that this isn't nil just before niling it out.

@@ -12,6 +12,12 @@

const CGRect kScreenSize = CGRectMake(0, 0, 600, 800);

// copied from clang document: https://clang-analyzer.llvm.org/faq.html#unlocalized_string
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we just use NSLocalizedString everywhere? It's a test, so it's not like that's going to affect a shipped binary.

@cyanglaz
Copy link
Contributor Author

cyanglaz commented Sep 8, 2023

@stuartmorgan Updated per review comment, PTAL!

format

fix

fix

fix
Copy link
Contributor

@stuartmorgan stuartmorgan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Don't forget to revert .ci.yaml :)

@cyanglaz
Copy link
Contributor Author

cyanglaz commented Sep 12, 2023

Don't forget to revert .ci.yaml :)

Thanks for the reminder! Juggling between several PRs and reviews and I've already forgotten about it.

@cyanglaz cyanglaz added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 12, 2023
@auto-submit auto-submit bot merged commit eab8b71 into flutter:main Sep 12, 2023
26 checks passed
@cyanglaz cyanglaz deleted the reland_unittest branch September 12, 2023 19:21
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Sep 13, 2023
…ions) (#134589)

Manual roll requested by bdero@google.com

flutter/engine@496ef6a...c90fadf

2023-09-12 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 43d4b1373788 to 1ee7ef8bbc65 (6 revisions) (flutter/engine#45726)
2023-09-12 ychris@google.com Reland "Build iOS unittest target in unopt builds" (#44356)"" (#45346)" (flutter/engine#45519)
2023-09-12 skia-flutter-autoroll@skia.org Roll Skia from a4f8f5177c8b to 211d63b1e1f5 (2 revisions) (flutter/engine#45724)
2023-09-12 jacksongardner@google.com Fix JS interop signatures to use only JS types. (flutter/engine#45668)
2023-09-12 ychris@google.com [ios] Fix testDeallocated failing locally.  (flutter/engine#45663)
2023-09-12 ychris@google.com [iOS] move arm64 builds to arm machines (flutter/engine#45721)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Mairramer pushed a commit to Mairramer/flutter that referenced this pull request Oct 10, 2023
…ions) (flutter#134589)

Manual roll requested by bdero@google.com

flutter/engine@496ef6a...c90fadf

2023-09-12 skia-flutter-autoroll@skia.org Manual roll Dart SDK from 43d4b1373788 to 1ee7ef8bbc65 (6 revisions) (flutter/engine#45726)
2023-09-12 ychris@google.com Reland "Build iOS unittest target in unopt builds" (flutter#44356)"" (flutter#45346)" (flutter/engine#45519)
2023-09-12 skia-flutter-autoroll@skia.org Roll Skia from a4f8f5177c8b to 211d63b1e1f5 (2 revisions) (flutter/engine#45724)
2023-09-12 jacksongardner@google.com Fix JS interop signatures to use only JS types. (flutter/engine#45668)
2023-09-12 ychris@google.com [ios] Fix testDeallocated failing locally.  (flutter/engine#45663)
2023-09-12 ychris@google.com [iOS] move arm64 builds to arm machines (flutter/engine#45721)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC bdero@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App platform-ios
Projects
None yet
2 participants