Page MenuHomePhorge

Packages: Load'em from .cache
Needs ReviewPublic

Authored by avivey on Feb 4 2022, 11:05.
Referenced Files
F361889: D25033.diff
Wed, Oct 4, 19:48
F361888: D25033.diff
Wed, Oct 4, 19:48
Unknown Object (File)
Fri, Sep 29, 04:58
Unknown Object (File)
Tue, Sep 26, 09:57
Unknown Object (File)
Sun, Sep 24, 21:27
Unknown Object (File)
Sun, Sep 24, 20:18
Unknown Object (File)
Thu, Sep 14, 01:28
Unknown Object (File)
Sun, Sep 10, 20:58


Group Reviewers
O1: Blessed Committers
Maniphest Tasks
T15068: Distribution mechanism for arc extensions

(This used to be T21485 on secure-dot, but it never got anywhere)

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",

and a manifest looks like this:

    "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, 18 KB)

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

Diff Detail

rARC Arcanist
Lint Passed
Advicesrc/packages/ArcanistPackagesLoader.php:68XHP16TODO Comment
Advicesrc/workflow/ArcanistPackagesWorkflow.php:157XHP16TODO Comment
Advicesrc/workflow/ArcanistPackagesWorkflow.php:182XHP16TODO Comment
Tests Passed
Build Status
Buildable 62
Build 62: arc lint + arc unit

Event Timeline

avivey requested review of this revision.Feb 4 2022, 11:05
avivey retitled this revision from start: read packages info from config to Packages: Load'em from .cache.Feb 4 2022, 11:07
avivey edited the test plan for this revision. (Show Details)

This is my primary jab at Packages - think of it maybe as an RFC.

The design is basically borrowed from VSCode - download stuff into a known location, then load what's needed at run-time.
This assumes local disk is trusted, and that disk space is practically infinite/free. We can add the security stuff on the installation flow.

(I have not tried this patch but I checked with ls -la the mess in my .cache to understand best practices from other software)

What about ~/.cache/arcanist/packages instead?