EAZY-Project - Interactive Project Generator & Manager
This used to be a fork from cl-project@fukamachi, but since almost everything is rewritten and added very much of new features, I renamed it as a new library. It is focused on the interactive features.
Now quicklisp loadable:
;; Add this statement in your .sbclrc / .ccl-init.lisp (ql:quickload :eazy-project.autoload) ;; To launch a menu, enter "!". ;; This is a symbol-macrolet alias to (eazy-project:launch-menu). ;; symbol "!" is imported to CL-USER when eazy-project.autoload is loaded. ! ;; When you do not want to import it, load eazy-project and reference to ! using a package prefix (ql:quickload :eazy-project) eazy-project:! ;; You can RESTORE the previous state simply by "!!", which is also loaded to CL-USER. ;; See the next section to know how to save a session. !!
Tested on SBCL-1.2.1 x64 and CCL 1.9 x64.
Tutorial: Restore the Yesterday's Coding Environment
Save and restore the set of currently loaded libraries. In the main menu, select the
SESSION submenu. (The menu items below might not reflect the latest version)
(You are now in menu EP-MAIN.) What to do next? ... ... [Condition of type EAZY-PROJECT:ASK] Restarts: 0: [SESSION] Save/Restore the currently loaded libraries 1: [CREATE-PROJECT] Create a new project. 2: [SET-GLOBAL] Modify these default values 3: [UP] Back to the section EP-MAIN. 4: [QUIT-SESSION] Quit this session. 5: [RETRY] Retry SLIME REPL evaluation request.
(You are now in menu SESSION.) What to do next? [Condition of type EAZY-PROJECT:ASK] Restarts: 0: [TOGGLE-WATCH] Watch and automatically save the session 1: [ADD-DEFAULT-SYSTEM] Add-Default-System 2: [SAVE] Save the current loaded session 3: [ABORT] Return to sldb level 1. 4: [UP] Back to the section EP-MAIN. 5: [QUIT-MENU] Quit this eazy-project menu.
Then, SAVE or RESTORE the current session. SAVE will store the current
asdf:already-loaded-systems to a persistent database. RESTORE will restore the saved session. Finally, TOGGLE-WATCH will initiate watching in a background thread which periodically check and save the session.
Tutorial: Creating a project using templates
Assume you are creating a new project named "myproj". First, open the menu. It should look something like below (depending on the implementation).
(You are now in menu EP-MAIN.) What to do next? Here are current default configs: :SESSION.SYSTEMS = (... "fare-quasiquote") :SESSION.PACKAGE = "COMMON-LISP-USER" :LOCAL-REPOSITORY = #P"/mnt/video/guicho/repos/lisp/" :SKELETON-DIRECTORY = #P"/mnt/video/guicho/repos/lisp/eazy-project/skeleton" :AUTHOR = "Masataro Asai" :EMAIL = "firstname.lastname@example.org" :GIT = T :README-EXTENSION = "md" :SOURCE-DIR = "src" :TEST-DIR = "t" :TEST-SUBNAME = "test" :DELIMITER = "." :LICENSE = "LLGPL" :TEST = :FIVEAM [Condition of type EAZY-PROJECT:ASK] Restarts: 0: [SESSION] Save/Restore the currently loaded libraries 1: [CREATE-PROJECT] Create a new project. 2: [SET-GLOBAL] Modify these default values 3: [UP] Back to the section EP-MAIN. 4: [QUIT-SESSION] Quit this session. 5: [RETRY] Retry SLIME REPL evaluation request.
Noitice the several entries that could be added to your new project, e.g., :AUTHOR is set to "Masataro Asai", and :EMAIL is "email@example.com". Most of these entries are already customized for you.
These default variables can be customized by proceeding to the submenu
EP-MAIN -> SET-GLOBAL. The similar interactive interface would show up. Follow the instructions there.
If you are satisfied with these global configurations,
CREATE-PROJECT. A new debugger menu would appear.
(You are now in menu CREATE-PROJECT.) Select and enter the information, then select 'CREATE'. Current global configuration: .... Current local configuration: (no configuration specified) [Condition of type EAZY-PROJECT:ASK] Restarts: 0: [CREATE] Create 1: [RESET-LOCAL-CONFIG] Reset the current local config 2: [ADD-LOCAL-DEPENDENCY] Add-Local-Dependency 3: [NAME] Name ...
In this submenu, you can further modify several project-local configurations. Those configurations are cleared each time you enter
NAMEto enter the name of the new project, now "myproj". (if when you attempt to create a project without it, the generator complains and opens an interactive prompt).
- You can further add the dependencies in ADD-LOCAL-DEPENDENCY submenu.
- The project-local dependency is a dependency only for this project.
CREATE. It will set up the repository, initialize the repo with git (by default. It can be disabled) and load it.
TODO Using Programatically
Although it is possible, the interface is not documented not structured very well. For automated testing, I'm using
simulate-menu-selection, but please don't use it. For such a purpose, use
(simulate-menu-selection `((eazy-project::create-project) (:name "test") (eazy-project::create)))
I plan to separate the interactive interface as an independent library in the near future.
Skeleton of the new project is currently not customizable, unlike original
- Masataro Asai