eazy-project

2019-07-11

Generate and Manage a Project

Upstream URL

github.com/guicho271828/eazy-project

Author

Masataro Asai

License

LLGPL
README

1EAZY-Project - Interactive Project Generator & Manager

https://travis-ci.org/guicho271828/eazy-project.svg?branch=master

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: (ql:quickload :eazy-project).

2Launching the menu from the shell

In order to use the library from the command line you have to install it from ros install.

$ ros install eazy-project
$ eazy-project

Make sure ~/.roswell/bin is in the PATH. otherwise replace the second line with ros exec eazy-project

3Usage

On the command line:

$ eazy-project                 # launches the main menu.
$ eazy-project <project name>  # starts from the project creation submenu, with the project name already set.

On REPL:

;; 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.
!

;; "!!" restores the saved lisp state (described later).
!!

;; Otherwise load eazy-project and use !/!! with a package prefix
(ql:quickload :eazy-project)
eazy-project:!

3.1Tutorial: Creating a project using templates

Assume you are creating a new project named "myproj". First, open the menu from a REPL or the command line.

(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               = "guicho2.71828@gmail.com"
: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 are already filled in, e.g., :AUTHOR = "Masataro Asai"=, =:EMAIL = "guicho2.71828@gmail.com"=. They can be modified later in =SET-GLOBAL submenu. The similar interactive interface shows up. To select a submenu, enter the corresponding number for the restarts (0-5) or click on each menu (on Slime REPL).

If you are satisfied with these global configurations, then select CREATE-PROJECT. A new menu shows up:

(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 CREATE-PROJECT submenu.

  • Select NAME to enter the name of the new project, now "myproj". (ifyou attempt to create a project without it, the generator complains andopens 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.

Finally, select CREATE. It will set up the repository, initialize the repo with git (by default. It can be disabled) and load it.

3.2Tutorial: 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)

Main menu:

(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.

SESSION submenu:

(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 *package* and 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.

3.3TODOUsing 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 cl-project.

(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.

3.4TODOSkeletons

Skeleton of the new project is currently not customizable, unlike original cl-project.

Dependencies (10)

  • bordeaux-threads
  • cl-emb
  • cl-ppcre
  • cl-syntax
  • fiveam
  • introspect-environment
  • iterate
  • lisp-namespace
  • local-time
  • trivia

Dependents (0)

    • GitHub
    • Quicklisp