-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Build xcarchive command #67598
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
Build xcarchive command #67598
Conversation
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.
Archive also doesn't need config-only, simulator, or codesign flags.
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.
This hunk is mostly whitespace changes. The copy logic and watch companion adjustments were moved into the buildAction == XcodeBuildAction.build condition.
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.
This bit is new.
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.
What circumstance would lead to the archive missing but no build errors?
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.
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.
FYI @xster do you have any more context here?
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.
Mostly cribbed from build_macos_test.dart
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.
nit, document a little bit
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.
also, if you never switch over this consider using String constants
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 prefer comparing enums to strings whether it's in a switch or an if conditional, strings are for human readability (and for wrapping a bunch of shelled out commands, as we do...). It also adds some pseudo type checking when being passed around. And not that it matters in this context, but the comparison is faster (at least in most languages, maybe dart does something as fast with a const string?). The only time when you have to think about it a bit is when you're serializing it to make sure if you insert one into the middle of the list it doesn't change the order of the enumeration symbols. But I'd rather serialize an int than a string in that case anyway.
dart-lang/language#158 would be nice.
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 don't really think the performance will matter for this code, but ack on the usability.
packages/flutter_tools/test/commands.shard/hermetic/build_xcarchive_test.dart
Outdated
Show resolved
Hide resolved
11022d8 to
a06832e
Compare
jonahwilliams
left a comment
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.
LGTM
Can you create a follow up ticket for website documentation?
|
Description
Create a new
flutter build xcarchivecommand. It's close to the same asflutter build iosbut witharchivetacked onto the end of thexcodebuildcommand.Related Issues
Fixes #66619
Part of #13065
Follow up documentation at flutter/website#4852.
Tests
build_xcarchive_test, added a check to ios_content_validation_test.
Checklist
///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change