Cider offers some User commands that are useful to manage projects. In addition is also offers an API.
It cooperates with Tatin and APLGit2 if available.
Cider requires
- Dyalog 18.0 Unicode or better
- Link 3.0.8 or better
If Tatin packages are part of a project then Tatin is required as well.
These commands are available:
]Cider.OpenProject
]Cider.CreateProject
]Cider.CloseProject
]Cider.Help
]Cider.ListOpenProjects
]Cider.ListAliases
]Cider.Make
]Cider.RunTests
]Cider.Version
]Cider.ViewConfig
]Cider.ListTatinPackages
In this document only OpenProject
is discussed in detail because that is the principal command.
For all other commands only basic information is provided, but there is a document "Cider-User-Guide.html" available that discusses all features in detail.
The user command help is also pretty exhaustive.
Regarding the API there is a document "Cider-API-Reference.html" available.
With version 0.23 Cider became a Tatin package. That simplifies the installation process: all you need to do is issue this command:
]Tatin.InstallPackages [tatin]Cider [MyUCMDs]
When a new instance of Dyalog is started ]Cider
will be available. For an instance that was already running when Cider was installed execute ]UReset
.
[MyUCMDs]
is an internal alias that refers to a folder MyUCMDs/
which is, among others, scanned by Dyalog for user commands when a new instance is fired up.
If you are interested in details: https://aplwiki.com/wiki/Dyalog_User_Commands
Accepts an optional parameter that must be one of:
- A folder that hosts a file
cider.config
- An alias that points to such a folder
If no such parameter is specified then the current directory is searched for a file cider.config
.
-
If such a file exists the user is asked whether she really wants to open that project
-
If no such file exists then under Windows a dialog box is opened that allows the user to navigate to a Cider project
On non-Windows platforms an error is thrown.
Once a folder is established that holds a Cider config file, the user command performs the following actions:
-
Creates the project space (namespace)
-
Sets the system variables
⎕IO
and⎕ML
in the project space -
Brings all code and variables into the project space
-
Checks whether any Tatin install folders do not actually have any packages installed but have a non-empty dependency file.
This may happen in case the package install folders are not uploaded to, say, GitHub (
.gitignore
) and the project was just downloaded. -
Asks the user whether Cider should check all Tatin packages (if there are any) for later versions
-
Loads all Tatin packages specified in the file
cider.config
, if any; seedependencies.tatin
anddependencies_dev.tatin
-
Injects a namespace
CiderConfig
into the project space and...- populates it with the contents of the configuration file as APL arrays
- adds a variable
HOME
that remembers the path the project was loaded from
-
Injects a namespace
TatinVars
in case the project would end up as a package -
Checks whether the project's config file does carry a non-empty value for
init
. If that's the case it must be a function that is then called by Cider, typically for initializing the project -
If the project is managed by Git and the user command
]APLGit
is around and the git bash is installed then Cider executes thegit status
command on the project folder and puts the result on view
Notes:
-
The name of the project space is defined in the Cider config file, but this can be overwritten with the
-projectSpace=
option -
In case the
dependencies.tatin
anddependencies_dev.tatin
parameter specifies one or more packages then the references pointing to those Tatin packages are all established inprojectSpace
by default.However, this can be overwritten by specifying a different target space by adding:
=SubNamespace
after the folder
Example:
dependencies { tatin: "packages" } dependencies_dev { tatin: "packages_dev=TestCases" }
-
All principal packages found in
packages/
within the project folder are loaded into the project space because that is the default, and the default was not overwritten -
All principal packages found in
packages_dev/
within the project folder are loaded into the project's sub namespaceTestCases
within the project space because the default was overwritten
-
Takes one or more folders or a aliases and breaks the Link between the namespace and its folder for all of them.
Separate projects with space or commas.
You may specify the -all
flag to close all projects in #
(not ⎕SE
!), but check the user command's detailed help (-??
) for details.
Requires one mandatory parameter: a folder that is going to be a project.
Creates a file cider.config
in that folder.
Offers the user to view selected or all HTML documents with her standard browser.
Lists the project spaces of all currently linked projects together with the fully qualified paths of all projects currently open.
Lists all Cider aliases together with their folders.
Prints an APL statement to the session which, when executed, will build a new version of the project.
Prints an APL statement to the session which, when executed, runs the project's test suite.
Returns a three-item-vector with "Name", "Version number" and "Version date".
Puts the config file of a project on display.
By specifying the -edit
flag the user might edit the file rather than just viewing it.