theaplroom / APM

APL package manager
2 stars 0 forks source link

Central Package Repository (CPR is vital, right?) #6

Open e9gille opened 6 years ago

e9gille commented 6 years ago

There are many reasons to have one, but one of the more important aspects is the simplicity of accessing packages.

Yes, we could access the release versions from GitHub directly, but if we create a public CPR server and the APM client is configured to use that one (as a default setup), then consuming packages becomes easier.

I've become accustomed to navigating the filesystem with the shell (cmd prompt) and relying on the current directory a lot. I'm hoping that with APM I'll be able to follow these steps:

C:\Users\gil>dyalog starts dyalog in my user folder ]acre.createproject ./MyApp creates the project folder on disk, opens it and prompts if I want to set it to my current dir. Then to install my dependencies I can search the repository:

]apm.list APLTeam
APLTreeUtils
DateAndTime
... 
MarkAPL

Get more info on a specific package:

]apm.show APLTreeUtils
APLTreeUtils v1.0.0 - first release
APLTreeUtils v1.0.1 - fix issue with dmb on large arrays
APLTreeUtils v1.1.0 - added methods X,Y and Z
...
APLTreeUtils v2.0.0 - Dyalog v17 support

Install it for current project: ]apm.add APLTreeUtils 1.1.0

  1. downloads the package if not already available in local cache
  2. installs it in project folder
  3. updates the project config file with the dependency
  4. loads it into session

If CPR is created as a docker container, it can easily be installed in a corporate environment to provide a private CPR with the option to fall back on the public one.

aplteam commented 6 years ago

Yes, something like that is highly appreciated.

PaulMansour commented 6 years ago

Sorry for late comment on this. Was not "watching" and unaware of new comments.

I think yes, a CPR is vital, but it have not thought much about it as it depends on what a project is, and how projects work together. I think once we have the mechanics of projects worked out, the CPR should fall into place easily.

Some questions:

What does "installs it in project folder" mean? Does this mean a package is copied in under the project folder? Does it get stored in Git under the project? When I clone a repository, will I get all the dependent packages?

If I have 3 projects and they all use package P, are there three copies of P, one in each project folder?