-
Notifications
You must be signed in to change notification settings - Fork 6k
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
Started adding the engine hash to frameworks' Info.plist. #9847
Conversation
build/copy_info_plist.py
Outdated
text = open(sys.argv[1]).read() | ||
engine_path = os.path.join(os.getcwd(), "..", "..", "flutter") | ||
revision = git_revision.GetRepositoryVersion(engine_path) | ||
text = text.replace("</dict>", """ <key>EngineVersion</key> |
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.
Would it make more sense to actually use an XML parser for this? If we add more features to this it may get harder to track.
Alternatively, we could just have the whole plist string in here as a template and use something like String.format
, like in https://github.com/flutter/engine/blob/master/tools/gen_android_buildconfig.py
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 considered both things but decided against them. There wasn't a compelling reason to make it more complicated. I didn't want to fiddle much with the formatting and some xml parsers trip up on schemas. Ultimately I went with KISS. I'm open to either of those approaches if it becomes easier / more robust.
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's the failure mode if someone someday adds another dictionary entry to Info.plist?
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.
Ok, I forgot dictionaries were valid in an Info.plist. I'll switch it to the template implementation in a sec.
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.
Done.
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. I wonder if there's some way we can have a comment in the plist to indicate where thse things get set, but without actually having the comment end up in the output file - or at least having it in some way that would be sane in an output file.
Yea, one problem with using format versus a replace is that it is a bit harder to search on. Potentially the file could have been like this:
...It isn't too hard to find by just searching the filename the BUILD.gn file shows up. |
This commit is causing LUCI failures on iOS 32 Bit targets https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8907736259253359424/+/steps/iOS_Unit_Tests/0/stdout |
flutter/engine@e3e4b26...f336286 git log e3e4b26..f336286 --no-merges --oneline f336286 Roll src/third_party/skia 947efe28de74..08ba11370342 (9 commits) (flutter/engine#9865) dcac8a9 Fixed error in generated xml Info.plist. (flutter/engine#9867) b7e5940 Started adding the engine hash to frameworks' Info.plist. (flutter/engine#9847) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
flutter/engine@e3e4b26...f336286 git log e3e4b26..f336286 --no-merges --oneline f336286 Roll src/third_party/skia 947efe28de74..08ba11370342 (9 commits) (flutter/engine#9865) dcac8a9 Fixed error in generated xml Info.plist. (flutter/engine#9867) b7e5940 Started adding the engine hash to frameworks&flutter#39; Info.plist. (flutter/engine#9847) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff ([email protected]), and stop the roller if necessary.
Relevant issue: flutter/flutter#13879