Page MenuHomePhabricator

Packages: Load'em from .cache
Needs ReviewPublic

Authored by avivey on Oct 30 2020, 4:34 PM.

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

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

Diff Detail

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