Page MenuHomePhabricator

Packages: Load'em from .cache
Needs ReviewPublic

Authored by avivey on Oct 30 2020, 4:34 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Dec 17, 4:56 AM
Unknown Object (File)
Mon, Dec 16, 5:47 PM
Unknown Object (File)
Sat, Dec 7, 7:16 AM
Unknown Object (File)
Thu, Dec 5, 1:38 PM
Unknown Object (File)
Wed, Nov 27, 7:34 PM
Unknown Object (File)
Thu, Nov 21, 10:14 AM
Unknown Object (File)
Tue, Nov 19, 11:13 AM
Unknown Object (File)
Nov 9 2024, 5:28 AM
Subscribers

Details

Summary

This is the basis of the client-side support for Packages:

  • Installed packages are under ~/.cache/arcanist-packages/<identifier>-<version>.
  • A package has a manifest file called .arcpackage.
  • A package can be Requested from any config source, as packages, an array of objects.

This change includes:

  • loading requested packages that are installed
  • list all installed packages
  • a flow to install a package (but not to configure loading it).

To configure a package, this goes in any config file:

{
  "packages": [
    {
      "identifier": "pk1",
      "version": "1.12"
    },
    {
      "identifier": "aviv.demo1",
      "version":"1.0"
    }
  ]
}

and a manifest looks like this:

.arcpackage
{
    "identifier": "aviv.demo1",
    "version": "1.0",
    "Description": "An important demo package"
}

The --install-from-tgz flow is obviously just temporary, to be replaced later with better setup.

Test Plan

image.png (159×853 px, 24 KB)

Also used --install-from-tgz on a package.

Diff Detail

Repository
rARC Arcanist
Branch
packages
Lint
Lint Passed
SeverityLocationCodeMessage
Advicesrc/packages/ArcanistPackagesLoader.php:68XHP16TODO Comment
Advicesrc/workflow/ArcanistPackagesWorkflow.php:157XHP16TODO Comment
Advicesrc/workflow/ArcanistPackagesWorkflow.php:182XHP16TODO Comment
Unit
Tests Passed
Build Status
Buildable 24952
Build 34426: Run Core Tests
Build 34425: arc lint + arc unit