Page MenuHomePhorge

Packages: Load'em from .cache
Needs ReviewPublic

Authored by avivey on Feb 4 2022, 11:05.
Tags
None
Referenced Files
F184008: D25033.diff
Tue, Sep 27, 03:08
Unknown Object (File)
Tue, Sep 20, 15:35
Unknown Object (File)
Tue, Sep 20, 15:35
Unknown Object (File)
Mon, Sep 19, 14:42
Unknown Object (File)
Mon, Sep 19, 00:15
Unknown Object (File)
Sat, Sep 17, 12:10
Unknown Object (File)
Wed, Sep 14, 12:15
Unknown Object (File)
Mon, Sep 12, 15:45

Details

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

(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",
      "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, 18 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 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.