Distro the AS3 package manager

Among different open source project I got inline there is distro

the plan is basically that

the first phase will be focused on a
Project/application dependency manager (PDM)

which could lead later to a
Language Package Manager (LPM)

use case
distro install --option1 --option2 [library name]

for example:
distro install --global --library starling

Ultimately the tool and the REST API would be able to handle different categories

  • Runtime
    ex: install AIR runtime vX.Y.Z
    ex: install Flash Player vX.Y.Z
  • Native Library
    ex: install playerglobal.swc vX.Y.Z
  • Library
    install AS3 sources, ABC, SWC, SWF, ANE
  • Executable
    install command-line executable
    install AIR apps
  • SDK
    install Flex SDK vX.Y.Z
  • Tools
    not necessary install but at least listing
    for ex: Flash Develop, Brackets, Sublime Text
    eg. tools related to work with AS3 projects
    vould be a sprite sheet editor, IDE, anything really

The REST API will be made in such a way that once you register an account, you will be able to edit the data of different projects

  • add an AS3 library
  • edit/update an existing AS3 library
  • take ownership of an AS3 library
  • etc.

And because the system is based on a REST API
even if I would provide a command-line tool
it should also be possible to produce other kind of tools

Think “GET the list of all AS3 libraries as JSON” (or XML or AMF)
and display it in a desktop AIR application for example

I’m still in the design phase, but when something will be released it will be small and do very basic things

and from there I will iterate, adding more features and functionalities


Wake me up! Am I dreaming? :wink:



Can’t we use gradle for this? Actually my gradle plugin could load any of these if we made these libraries available from bintray/jcenter and/or maven/sonatype. Or maybe i could implement Distro from my plugin as well :wink:

Sure, you can use gradle, gradlefx

oh wait all those depends on Java, let’s ditch Java
let’s just use npm instead

yeah we could make it work with npm, but wait this depend on node.js ecosystem
let’s use make instead

Technically you can use anything to build and manage dependencies, but then you realise that each ecosystem is different: Java does not have the same need than JavaScript does not have the same need than ActionScript 3, etc.

You study what have already been done for example
and then you encounter the repository problem

Even if you could borrow and use npm to build AS3 projects and their dependencies, you can see that it would not really work because the repository is for the JavaScript ecosystem.

Same goes for Gradle, GradleFx, FlexMojos, Maven, etc.
you can build AS3/SWC/etc. with those because most of our compiler tools are based on Java (Flex SDK, AIR SDK, etc.) but still those tools like Gradle are firmly part of the Java ecosystem.

ActionScript 3 as a language deserve its own ecosystem, with its own repository and so its own package manager.

You could also argue that we don’t need a REST API or even a repository we could just reuse github, and then read

CocoaPods downloads max out five GitHub server CPUs
and Github Outage and the dev reaction when that happen

You can also read stuff like
So you want to write a package manager
where the author goes to great length to convince you how writing a language package manager will make your life a misery and you should just give up …

while him… well him it’s different, he can apparently give it a shot, but you?, no you shouldn’t, and here the quote

Package management is awful, you should quit right now

and after that you then have a mini-novel about all the reasons you should quit and not do it …

And yet I’m still doing it.

Totally agreed that maven repo doesn’t really fit as3 libraries, but i guess if we can build our own repo like distro so we can target it from gradle, that would be great. I guess this is really the missing part from using gradle right now (getting libraries remotely).

That’s why it will be based on a REST API

Even if the first tool is a command line tool, such repository need to be able to be used in different way, think apt-get and aptitude.

But in all that my main point is this:

people only see ActionScript 3 as a client-side, visual programming tool or something related to a GUI, and sorry that’s not the only case anymore

not when you take into account Redtamarin

Gradle tag line is “A powerful build system for the JVM”

well … distro tag could be “a build system for the AVM2”


Hi @zwetan,

how’s Distro going along? :slight_smile:


distro is still happening, not a lot of free time that’s all

in summary, I needed an updated of the redtamarin runtime , this is coming around the 10/10
which then will allow to build a REST API (we could before, but it’s just gonna be better)

and distro will be on 2 parts then

  • a REST API
  • a command-line tool

it would be mainly done as a “Project/application dependency manager (PDM)” as planed
it may not evolve to a “Language Package Manager (LPM)”

I don’t think something like npm can really works, and for AS3 libraries we are closer to Java in term of packaging than JS.

So yeah the focus will be mainly on project/template configuration

just being able to do something like
$ distro install AIR_SDK_23
followed by
$ distro project AIR_IOS, AIR_ANDROID

so it first install an AIR SDK and then generate a base template for both iOS/Android apps
could ease up things for dev

The REST API will more act as a central/global access point for libraries configuration/metadata
then as an authority for those libraries, so even if something is not defined in the REST API a dev could easily override it with a simple JSON config.

Distro would be probably be closer to something like composer than npm.

The template part could be interesting, for redtamarin I got some documentation/template that I plan to publish that show “how to build a daemon for Linux” for example, it would be nice to be able to add such template to the distro REST API so other dev can just reuse it from distro, and so any dev could also “upload” their template to share with others.

I don’t haver everything figured out but here what I can say:

if when a new Flash/AIR runtime is released you go on Adobe web sites and download playerglobal.swc, and maybe store it in a directory like /runtime/flash/23_0/, and then download the AIR runtime and store it in /runtime/air_23_0/, and the download the AIR SDK and save it to /sdk/air/23_0/win and /sdk/air/23_0/osx etc.

a tool like distro should be able to automate those little things for you, eg. download from that url, store in that directory, install it in that special way, etc.

But it’s not here to replace you current tools, eg. you may want to download/install the AIR SDK automatically but you want to keep using ant/maven/etc. to build, so distort is not here to replace how you build usually.

Now if you in general use the same kind of “build” for a project, distro could help at that too, eg. “generate for that project an ant build configured with that AIR SDK and my build template XYZ”.

And the REST API would be there just to share this kind of config.

Sorry maybe a bit confusing explained like that, anyway, distro is not something I will develop for months and then release, as soon as a I got something ready even if it only install Flash/AIR runtime it will get released and will grow organically from there.