-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Enable Swift Package Manager by default on master channel #152049
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
Conversation
07344b4
to
345aeab
Compare
@@ -939,15 +939,6 @@ Future<void> _checkStatic(String pathToLibrary) async { | |||
} | |||
} | |||
|
|||
Future<String> _dylibSymbols(String pathToDylib) { | |||
return eval('nm', <String>[ | |||
'-g', |
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.
-g
is an alias for --extern-only
, description: Display only global (external) symbols.
final String symbolTable = await eval( | ||
'nm', | ||
<String> [ | ||
'-gU', |
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.
-U
's description: Don't display undefined symbols.
This isn't strictly necessary, it reduces the output of nm
.
@@ -77,6 +77,11 @@ class PluginTest { | |||
final _FlutterProject app = await _FlutterProject.create(tempDir, options, buildTarget, | |||
name: 'plugintestapp', template: 'app', environment: appCreateEnvironment); | |||
try { | |||
if (cocoapodsTransitiveFlutterDependency) { | |||
section('Disable Swift Package Manager'); | |||
await app.disableSwiftPackageManager(); |
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 update the build settings of pods that depend on the Flutter framework (including transitive dependencies). This test only makes sense for CocoaPods, so we need to ensure we use CocoaPods. (We don't mutate the build settings of Swift packages, and Swift packages never depend on the Flutter framework)
For more context, see: #125610
)); | ||
final bool swiftPackageManagerEnabled = generatedSwiftManifest.existsSync(); | ||
|
||
if (!swiftPackageManagerEnabled) { |
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.
I recommend reviewing this diff with whitespace disabled: https://github.com/flutter/flutter/pull/152049/files?diff=split&w=1
// Runner binary. | ||
final bool helloDynamic = outputPluginFrameworkBinary.existsSync(); | ||
final bool helloStatic = AppleTestUtils | ||
.getExportedSymbols(outputRunnerBinary.path) |
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.
AppleTestUtils.getExportedSymbols
is flutter_tools
's helper for nm
:
flutter/packages/flutter_tools/test/integration.shard/test_utils.dart
Lines 114 to 129 in 9181306
static List<String> getExportedSymbols(String dwarfPath) { | |
final ProcessResult nm = processManager.runSync( | |
<String>[ | |
'nm', | |
'--debug-syms', // nm docs: 'Show all symbols, even debugger only' | |
'--defined-only', | |
'--just-symbol-name', | |
dwarfPath, | |
'-arch', | |
'arm64', | |
], | |
); | |
final String nmOutput = (nm.stdout as String).trim(); | |
return nmOutput.isEmpty ? const <String>[] : nmOutput.split('\n'); | |
} | |
} |
This is effectively the same thing as the dumpSymbolTable
helper I added to the devicelab package. AFAICT we don't share code between the tool and devicelab (I suspect this is intentional).
4037f2f
to
dd1762a
Compare
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.
Thank you for figuring out the nm
details. LGTM!
Reason for revert: iOS builds failing in post-submit
|
…152049)" (#152243) Reverts: #152049 Initiated by: cbracken Reason for reverting: iOS builds failing in post-submit Original PR Author: loic-sharma Reviewed By: {jmagman} This change reverts the following previous change: Changes: 1. Enables Swift Package Manager by default on the main/master channel 2. Fixes tests that fail if Swift Package Manager is enabled Corresponding docs change: flutter/website#10938 Addresses #151567
#152049 was reverted as it broke several post-submit tests. This relands the test fixes in #152049 without enabling Swift Package Manager on the master channel. This change is split into two commits: 1. dd1762a - The changes in #152049 1. 00fdcfb - Undoes the changes that enabled Swift Package Manager on the master channel Part of #151567
…2049) Changes: 1. Enables Swift Package Manager by default on the main/master channel 2. Fixes tests that fail if Swift Package Manager is enabled Corresponding docs change: flutter/website#10938 Addresses flutter#151567
…lutter#152049)" (flutter#152243) Reverts: flutter#152049 Initiated by: cbracken Reason for reverting: iOS builds failing in post-submit Original PR Author: loic-sharma Reviewed By: {jmagman} This change reverts the following previous change: Changes: 1. Enables Swift Package Manager by default on the main/master channel 2. Fixes tests that fail if Swift Package Manager is enabled Corresponding docs change: flutter/website#10938 Addresses flutter#151567
…152267) flutter#152049 was reverted as it broke several post-submit tests. This relands the test fixes in flutter#152049 without enabling Swift Package Manager on the master channel. This change is split into two commits: 1. flutter@dd1762a - The changes in flutter#152049 1. flutter@00fdcfb - Undoes the changes that enabled Swift Package Manager on the master channel Part of flutter#151567
…2049) Changes: 1. Enables Swift Package Manager by default on the main/master channel 2. Fixes tests that fail if Swift Package Manager is enabled Corresponding docs change: flutter/website#10938 Addresses flutter#151567
…lutter#152049)" (flutter#152243) Reverts: flutter#152049 Initiated by: cbracken Reason for reverting: iOS builds failing in post-submit Original PR Author: loic-sharma Reviewed By: {jmagman} This change reverts the following previous change: Changes: 1. Enables Swift Package Manager by default on the main/master channel 2. Fixes tests that fail if Swift Package Manager is enabled Corresponding docs change: flutter/website#10938 Addresses flutter#151567
…152267) flutter#152049 was reverted as it broke several post-submit tests. This relands the test fixes in flutter#152049 without enabling Swift Package Manager on the master channel. This change is split into two commits: 1. flutter@dd1762a - The changes in flutter#152049 1. flutter@00fdcfb - Undoes the changes that enabled Swift Package Manager on the master channel Part of flutter#151567
Changes:
Corresponding docs change: flutter/website#10938
Addresses #151567
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.