Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Store symlinks in package archive#77184

Merged
jmagman merged 2 commits into
flutter:masterfrom
jmagman:symlinks-zip
Mar 4, 2021
Merged

Store symlinks in package archive#77184
jmagman merged 2 commits into
flutter:masterfrom
jmagman:symlinks-zip

Conversation

@jmagman

@jmagman jmagman commented Mar 4, 2021

Copy link
Copy Markdown
Member

Compressed publish package should preserve symlinks, or the FlutterMacOS.framework will be malformed and the app won't build.

--symlinks
              For UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link.  This can avoid multiple copies of files being included in the archive as zip recurses the directory trees and accesses files directly and by links.

Confirmed locally that zip -9 -r removed the FlutterMacOS.framework symlinks and zip -9 -r --symlinks preserves them.

Fixes #77173.

@jmagman jmagman self-assigned this Mar 4, 2021
@flutter-dashboard flutter-dashboard Bot added the c: contributor-productivity Team-specific productivity, code health, technical debt. label Mar 4, 2021
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@google-cla google-cla Bot added the cla: yes label Mar 4, 2021

@jonahwilliams jonahwilliams left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman

jmagman commented Mar 4, 2021

Copy link
Copy Markdown
Member Author
$ mkdir prepare
$ dart dev/bots/prepare_package.dart --temp_dir prepare --revision 60bd88df915880d23877bfc1602e8ddcf4c4dd2a --branch stable --no-publish 
...
Running "zip -r -9 --symlinks prepare/flutter_macos_2.0.0-stable.zip flutter" in prepare.

Unzip prepare/flutter_macos_2.0.0-stable.zip

$ ls -la prepare/flutter/bin/cache/artifacts/engine/darwin-x64/FlutterMacOS.framework
total 0
drwxr-xr-x   7 magder  primarygroup  224 Mar  3 16:34 .
drwxr-xr-x  13 magder  primarygroup  416 Mar  3 16:34 ..
lrwxr-xr-x   1 magder  primarygroup   29 Mar  3 16:34 FlutterMacOS -> Versions/Current/FlutterMacOS
lrwxr-xr-x   1 magder  primarygroup   24 Mar  3 16:34 Headers -> Versions/Current/Headers
lrwxr-xr-x   1 magder  primarygroup   24 Mar  3 16:34 Modules -> Versions/Current/Modules
lrwxr-xr-x   1 magder  primarygroup   26 Mar  3 16:34 Resources -> Versions/Current/Resources
drwxr-xr-x   4 magder  primarygroup  128 Feb 25 15:07 Versions

Symlinks preserved.

@christopherfujino christopherfujino left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmagman

jmagman commented Mar 4, 2021

Copy link
Copy Markdown
Member Author

I'm 100% confident this change didn't break

04:01 +3 ~2 -1: test\integration.shard\migrate_test.dart: dart migrate succeeds on module template [E]                                                                                                 
  TimeoutException after 0:01:00.000000: Test timed out after 1 minutes.
  dart:isolate  _RawReceivePortImpl._handleMessage

Will file an issue for that.

Merging on test failure and red tree so this can be prepped for a cherry-pick. 🤠

@jmagman jmagman merged commit 781eb13 into flutter:master Mar 4, 2021
@jmagman jmagman deleted the symlinks-zip branch March 4, 2021 01:21
@jmagman

jmagman commented Mar 4, 2021

Copy link
Copy Markdown
Member Author

Will file an issue for that.

#77191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: contributor-productivity Team-specific productivity, code health, technical debt.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Building for macOS target fails when installed from website, codesigning fails with "bundle format is ambiguous"

4 participants