-
Notifications
You must be signed in to change notification settings - Fork 6k
Reland "Build iOS unittest target in unopt builds" (#44356)" #44821
Reland "Build iOS unittest target in unopt builds" (#44356)" #44821
Conversation
@@ -263,7 +263,6 @@ source_set("ios_test_flutter_mrc") { | |||
} | |||
|
|||
shared_library("ios_test_flutter") { | |||
testonly = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we getting rid of this? It seems like a useful guard against non-test targets including test TUs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this flag is on, because flutter_framework
is not testonly, it cannot depend on ios_test_flutter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not make flutter_framework depend on ios_test_flutter, we should update some higher level BUILD.gn
that checks if unit tests are enabled and if so include ios_test_flutter (if ios etc.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g. in //BUILD.gn
something like
if (enable_unittests && is_ios) {
public_deps += [ "//flutter/shell/platform/darwin/ios:ios_test_flutter" ]
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add testonly= true
back now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Or I can make group(darwin) testonly? If that's a problem I can move the dependency to a upper level. Eventually I should be able to find a unbrella build target that is testonly up in the chain.
LGTM with nits. |
@@ -263,7 +263,6 @@ source_set("ios_test_flutter_mrc") { | |||
} | |||
|
|||
shared_library("ios_test_flutter") { | |||
testonly = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not make flutter_framework depend on ios_test_flutter, we should update some higher level BUILD.gn
that checks if unit tests are enabled and if so include ios_test_flutter (if ios etc.)
@chinmaygarde @dnfield Updated per review comments. PTAL |
shell/platform/darwin/BUILD.gn
Outdated
@@ -9,6 +9,9 @@ import("//flutter/shell/platform/config.gni") | |||
group("darwin") { | |||
if (is_ios) { | |||
deps = [ "ios:flutter_framework" ] | |||
if (is_debug) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about just if (enable_unittests)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
enable_unittests = current_toolchain == host_toolchain || is_fuchsia || is_mac
, I will add || is_ios
I moved the test to the top level |
I am not sure why GitHub is confused about this. @dnfield Can you reset your review? The assert doesn't exist anymore so this is good to go. |
…133810) flutter/engine@51090e3...ca513c9 2023-08-31 [email protected] Revert "Reland "Build iOS unittest target in unopt builds" (#44356)"" (flutter/engine#45346) 2023-08-31 [email protected] Lazily allocate RasterCacheItems only when caching is enabled (flutter/engine#45211) 2023-08-31 [email protected] Roll Skia from 8ff4fd208c26 to 5d08dadd2ef4 (3 revisions) (flutter/engine#45340) 2023-08-31 [email protected] Reland "Build iOS unittest target in unopt builds" (#44356)" (flutter/engine#44821) 2023-08-31 [email protected] Update comment const_finder.dart (flutter/engine#45180) 2023-08-31 [email protected] Replace an unnecessary util function with PostSync (flutter/engine#45190) 2023-08-31 [email protected] Roll Skia from cda0cfaadfd7 to 8ff4fd208c26 (3 revisions) (flutter/engine#45337) 2023-08-31 [email protected] Roll Dart SDK from 0cea73a8d3c3 to ac3bc9f6351a (4 revisions) (flutter/engine#45336) 2023-08-31 [email protected] [macOS] Link __availability_version_check (flutter/engine#45333) 2023-08-31 [email protected] Roll Skia from 8c05d5103d6b to cda0cfaadfd7 (3 revisions) (flutter/engine#45334) 2023-08-31 [email protected] Adds an --rbe option to tools/gn that works on Linux hosts (flutter/engine#45271) 2023-08-31 [email protected] Migrate VK calls of GrBackend* (flutter/engine#45325) 2023-08-31 [email protected] Roll buildroot (flutter/engine#45329) 2023-08-31 [email protected] Revert dl split (flutter/engine#45326) 2023-08-31 [email protected] Roll Skia from d113402de2ce to 8c05d5103d6b (4 revisions) (flutter/engine#45331) 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 [email protected],[email protected],[email protected] 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
…" (#45519) Reland #44821 [C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Relands #44301
The original PR was reverted in #44356
The
assert flutter_dylib_time <= ios_test_lib_time, final_message
check is reverted in 70dd9e4, so we are safe to land this again.Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.