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, Apr 16, 9:15 PM
Unknown Object (File)
Mon, Apr 8, 1:47 AM
Unknown Object (File)
Sat, Mar 30, 4:35 PM
Unknown Object (File)
Thu, Mar 28, 10:51 PM
Unknown Object (File)
Thu, Mar 21, 11:04 AM
Unknown Object (File)
Mar 16 2024, 11:27 AM
Unknown Object (File)
Mar 1 2024, 5:59 AM
Unknown Object (File)
Feb 21 2024, 2:28 PM
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