Commit Graph

17 Commits

Author SHA1 Message Date
Pascal Hartig
6913d6f653 Allow arbitrary packs
Summary:
The limitation to two types is arbitrary and limiting. Instead, we want to be able to create as many cache artifacts as is sensible to improve the caching behaviour.

A lot of unnecessary cloning in here. I might optimise this a bit in the future but it's not really perf critical as this is highly I/O bound.

Reviewed By: lblasa

Differential Revision: D38155922

fbshipit-source-id: 78b86ebff54269c5049e59197f1c25fedfad0111
2022-07-27 07:43:12 -07:00
Stiopa Koltsov
c915b03159 Remove ::{self}
Summary: Cleanup after reformat one import per line.

Reviewed By: zertosh

Differential Revision: D38169581

fbshipit-source-id: 1e82053b25e4426a983fe7416481611d91e4b484
2022-07-26 14:35:15 -07:00
Stiopa Koltsov
873c03396e Apply rustfmt
Reviewed By: zertosh, passy

Differential Revision: D37579214

fbshipit-source-id: 0e52bd2b27abbbde32f77b073d3ed5ef33f4d318
2022-07-01 09:21:52 -07:00
Pascal Hartig
317a89d5ea Avoid strutural repetition
Summary: ^

Reviewed By: lawrencelomax

Differential Revision: D35940119

fbshipit-source-id: 055e57bb9b9174b275fc0fccfff80a04b3f04b30
2022-04-27 04:23:09 -07:00
Pascal Hartig
bb936aaf0f Make Platform a newtype
Summary:
Just a bit of extra type safety. The previous diff caused a bit of a regression
by making things stringly-typed.

Reviewed By: lblasa

Differential Revision: D35902107

fbshipit-source-id: a599106f899ec3d205663b5791420aee29f3eeae
2022-04-26 03:29:40 -07:00
Pascal Hartig
3c6a5c58f9 Move basedir to config file
Summary: This allows us to extend this more easily to server builds, too.

Reviewed By: lblasa

Differential Revision: D35901750

fbshipit-source-id: 7030846ad485d709cf4c2e95f0cad287f98b051b
2022-04-26 03:29:40 -07:00
Pascal Hartig
b80766323f Upgrade packer
Summary:
This had collected a bit of dust and we will need to extend this a little for flipper-server.

- Update deps.
- Migrate away from deprecated clap2 model to derive (it's much shorter now and less imperative).
- ~~Some COW changes on how the progress bar crate handles strings.~~ (Reverted as this causes havvoc in `fbsource//third-party/rust`.)
- Upgraded to 2021 Edition.

Reviewed By: nikoant

Differential Revision: D35433571

fbshipit-source-id: ae0a91558610ae46069a5fc5162b524cde759454
2022-04-07 07:40:57 -07:00
Andres Suarez
79023ee190 Update copyright headers from Facebook to Meta
Reviewed By: bhamodi

Differential Revision: D33331422

fbshipit-source-id: 016e8dcc0c0c7f1fc353a348b54fda0d5e2ddc01
2021-12-27 14:31:45 -08:00
Pascal Hartig
ca55e68c89 Set up infra for different packing mode
Summary:
Electron 12 broke packing again because one file was renamed. I'm now setting up a separate mode for using globs and ignores to create artifact bundles. This will work like a reverse gitignore file. However, to keep the logic simple, I'll keep the old mode for MacOS where the folder structure lends itself to comprehensive, exact lists.

**This doesn't actually change anything just yet apart from the "packfile" format. The next diff will add the new packing mode. Feedback is always welcome but there's no need for super close scrutiny.**

Reviewed By: mweststrate

Differential Revision: D27191506

fbshipit-source-id: 663cef8b93eef6c2dbb56ef66de51ea9551412dd
2021-03-23 13:28:14 -07:00
generatedunixname89002005325677
cdb0570c43 Daily arc lint --take RUSTFMT
Reviewed By: zertosh

Differential Revision: D25216089

fbshipit-source-id: e7cdf6a5b23e18ba2bfebbe24979cf67f5d55b00
2020-11-30 03:51:30 -08:00
Pascal Hartig
911c3e297c Fix lints (#1716)
Summary:
Fix a lint that's currently failing.
See https://github.com/facebook/flipper/runs/1449249447?check_suite_focus=true

Pull Request resolved: https://github.com/facebook/flipper/pull/1716

Test Plan: cargo clippy succeeds now.

Reviewed By: nikoant

Differential Revision: D25170963

Pulled By: passy

fbshipit-source-id: 658f8b6abaef9860be9ff07447d2354727acb7c7
2020-11-27 04:10:09 -08:00
Pascal Hartig
d477ed7818 Address lints
Summary: Just going through all the lints that have popped up.

Reviewed By: jknoxville

Differential Revision: D24078571

fbshipit-source-id: 06504aafa969eea92ee934ac607d3daf51e47914
2020-10-02 06:37:45 -07:00
Pascal Hartig
2bbd76803c Use new checksums in manifest
Summary: This now makes use of the `tarsum` mod to surface both intrinsic and extrinsic checksums as part of the manifest. I also threw in the file name and the bytes for good measure. This is output in Sandcastle logs and can help identify mismatches. The filename also means we no longer have to rely on piecing together paths on Sandcastle which is nice.

Reviewed By: nikoant

Differential Revision: D24046464

fbshipit-source-id: dc6dc50eb510a067674166b5fdb11af9cf6762b2
2020-10-02 03:20:21 -07:00
Pascal Hartig
ba0a706bc8 Small fixes
Summary: Some small perf improvements, remove unnecessary cloning, etc.

Reviewed By: jknoxville

Differential Revision: D22307521

fbshipit-source-id: 91cfd16b0b05a24ec9639c2a2e26d504a6b01de4
2020-06-30 06:20:11 -07:00
Pascal Hartig
5cc9af4b5d Hashing and Manifest
Summary: Hashes the artifacts and adds the information to a manifest. This will then be used to upload to a blob store, and save the information so it can be retrieved again later. Not sure if I want to stick with SHA256 or if there's something more efficient like Cityhash, given that we don't really care about cryptographic properties here.

Reviewed By: jknoxville

Differential Revision: D21380369

fbshipit-source-id: e9c5cd56d94f3083ae5ed6396673d00cbf98ce39
2020-05-07 07:22:51 -07:00
Pascal Hartig
8818fbe375 Build all artifacts from packlist
Summary:
Instead of hardcoding the targets, it will now build all specified
types in the "packlist".

Reviewed By: jknoxville

Differential Revision: D21349762

fbshipit-source-id: 58f4a3bbf0b6ff4dd87eb44bbd7b200127da8017
2020-05-01 09:43:17 -07:00
Pascal Hartig
155a8c6952 Initial packer project
Summary:
This is a tool (right now more a script, really) for splitting a Flipper distribution into smaller chunks that can be individually cached, hashed and downloaded. It's incomplete but can already bundle up Mac apps into smaller chunks that can be merged back again into one app.

It takes a config file that specifies how to slice the inputs up and comes with a default copy bundled in. That's in line with the general "design" where it tries to make the right assumptions, for instance defaulting to the normal dist output directory.

Reviewed By: jknoxville

Differential Revision: D21302551

fbshipit-source-id: b22670ff4825ce526dd0f20320f87080c058cd93
2020-05-01 04:04:48 -07:00