-
Notifications
You must be signed in to change notification settings - Fork 84
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
bazel: add release configuration #155
Conversation
Adds a `--config=release` option for building with Bazel. At the moment, this ensures that iOS builds include all 4 architectures instead of only x86. In the future, more configurations will likely be added here for better optimization settings. Signed-off-by: Michael Rebello <mrebello@lyft.com>
2115600
to
b9699d2
Compare
Signed-off-by: Michael Rebello <mrebello@lyft.com>
Signed-off-by: Michael Rebello <mrebello@lyft.com>
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.
Nice!
Currently getting an interesting error when building with this configuration. @keith is helping investigate:
|
Ideally we could fix that issue by updating rules_apple with this: diff --git i/tools/bundletool/bundletool.py w/tools/bundletool/bundletool.py
index e8a8a23..14ee471 100644
--- i/tools/bundletool/bundletool.py
+++ w/tools/bundletool/bundletool.py
@@ -106,7 +106,7 @@ class Bundler(object):
bundle_merge_zips = self._control.get('bundle_merge_zips', [])
root_merge_zips = self._control.get('root_merge_zips', [])
- with zipfile.ZipFile(output_path, 'w') as out_zip:
+ with zipfile.ZipFile(output_path, 'w', allowZip64=True) as out_zip:
for z in bundle_merge_zips:
dest = os.path.normpath(os.path.join(bundle_path, z['dest']))
self._add_zip_contents(z['src'], dest, out_zip) But there appears to be a bug in python2 that prevents this from working too https://bugs.python.org/issue23306 |
I'm attempting locally without |
Another update: Dropping the above flags still resulted in the zip error, as the artifacts are still ~800MB. Going to circle back to this with @keith when he's back on Monday |
Signed-off-by: Michael Rebello <mrebello@lyft.com>
636f3f3
to
5c366ff
Compare
Update: Ran without specifying the |
Ok so overall here's what I discovered:
For now I would recommend using python3 with bazel 0.27.0 (which upstream envoy supports as of last week) and ignoring the size issue, and once we're further along we can try and reduce that. But the 4gb size might be too large for now too, in which case we'll need to find a way to disable debug info for envoy libraries. |
Thanks so much for investigating, @keith! I'm on board with the temporary fix of using python3 / bazel 0.27.0 if that seems reasonable to @mattklein123 and @goaway, and we can track the upstream improvement in a separate issue. If this is the direction we want to move in, I can look into seeing if we have any issues with upgrading to 0.27.0 (I think @junr03 ran into a few with Android a few weeks back which may or may not still be relevant) |
Feel free to skip |
For future reference here's the python2 bug https://stackoverflow.com/questions/30376224/python-gzip-overflowerror-size-does-not-fit-in-an-int/38177538#38177538 |
Signed-off-by: Michael Rebello <mrebello@lyft.com>
Going to put this on hold until #116 is addressed (upgrading bazel to 0.27.0) |
Signed-off-by: Michael Rebello <mrebello@lyft.com>
@keith looks like this still fails with the latest master and bazel 0.28.0 with a similar error:
|
…onfiguration Signed-off-by: Michael Rebello <mrebello@lyft.com>
Signed-off-by: Michael Rebello <mrebello@lyft.com>
This pull request has been automatically marked as stale because it has not had activity in the last 7 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
This pull request has been automatically closed because it has not had activity in the last 14 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
…onfiguration Signed-off-by: Michael Rebello <me@michaelrebello.com>
Circling back to this, rebuilding after merging master yields basically the same error:
@goaway pointed out yesterday that That said, the error above is actually a segfault:
@keith do you have any more ideas on how we might be able to work around this? |
…onfiguration Signed-off-by: Michael Rebello <me@michaelrebello.com>
Signed-off-by: Michael Rebello <me@michaelrebello.com>
Updated the PR with a new set of configs per @goaway's suggestion (thank you!). Size diff of the zipped
I think we should go with this for now. |
Not having symbols will degrade crash reporting at least in Xcode. But with bitcode it should be fine. Which you actually might need to enable here |
I'll add bitcode enablement in a follow-up PR 👍 |
Being tracked in #208 |
Adds a
--config=release
option for building with Bazel. At the moment, this ensures that iOS builds include all 4 architectures instead of only x86. In the future, more configurations will likely be added here for better optimization settings.Risk Level: Low
Testing: Locally
Docs Changes: In PR