-
Notifications
You must be signed in to change notification settings - Fork 230
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
offline archive #4353
Comments
We don't have a separate command for this today, but you can already do:
Which would put the cache inside the current directory. Then when extracting somewhere run
To fix the absolute references in the .dart_tool/package_config.json |
The use case is building 100+ apps simultaneously with LTS support. The proposed archive method dramatically decreases build storage. As there is only one archive of a package, which may show up 100+ times. The compress pub cache approach uses much more disk space at scale. The pub cache restore step takes ~1 second when multi-threaded. |
Not sure I follow the use case exactly: You have 100 apps, and now you want to make a single archive with all of them, or one archive for each? Can you spell out what exactly the proposed command would do? |
@sigurdm
|
Not sure what you mean by this. The procedure I outlined above would only fetch the packages needed.
What are "references" in this context? |
Yes this is true for a single application. If I look at all the artifacts fetched for 100 apps, there are many common packages shared between them. This means the archive folder would only contain one copy of each package version. Using a compressed pub archive duplicates the same package version many times; thus increasing disk space.
These would be considered a reference:
|
Archive listing for flutter-gallery File sizes Flutter Gallery
|
I have a need to support Long Term Support (LTS); automotive and IOT.
I'm proposing a new sub command called archive.
This would cache source types hosted and git into an archive folder.
Then without Internet access you can restore said archive, and build.
I have an implementation in Python that does this today. I am using this with the Yocto build system:
https://github.com/meta-flutter/meta-flutter/blob/scarthgap/tools/pubspec.py
The text was updated successfully, but these errors were encountered: