xach / buildapp

Buildapp makes it easy to build application executables with SBCL
http://www.xach.com/lisp/buildapp/
122 stars 26 forks source link

Error processing dispatched entries when there is no default entry #38

Open rpgoldman opened 11 months ago

rpgoldman commented 11 months ago

When there is no default entry in a set of dispatched-entries, buildapp errors out without building.

I believe that it's going wrong at this line: https://github.com/xach/buildapp/blob/dd00f18938ccae0a9b406bfcfd882ad32abeb757/dumper.lisp#L123 but I'm not entirely sure what's the proximal call -- maybe the call to macroexpand-1 on (quit 1) causes (quit 1) to be executed?

Here's an example of the error:

BUILDAPP(3): (dispatched-entry-form (dispatched-entries *dumper*))
rpg@rpg-mbp182: ~/lisp/shop/shop3/buildapp $

To replicate, do rlwrap sbcl --eval '(ql)' --eval '(ql:quickload "buildapp")' --eval '(in-package :buildapp)' (cl-user::ql is my function that load setup) and then

(defparameter *args* (list "--logfile" "/tmp/buildapp-shop-app.log" "--output" "shop-app" "--dispatched-entry" "shop/shop-app::main" "--dispatched-entry" "ess-shop/shop-app::ess-main" "--load" "/Users/rpg/lisp/asdf/build/asdf.lisp" "--asdf-path" "/Users/rpg/lisp/shop/shop3/buildapp/../" "--asdf-tree" "/Users/rpg/lisp/shop/shop3/buildapp/../../jenkins/ext/" "--eval" "(declaim (optimize speed space safety))" "--load-system" "shop3" "--load" "/Users/rpg/lisp/shop/shop3/buildapp/shop-app-entrypoints.lisp" "--dumpfile-copy" "/tmp/dumpfile-copy.lisp"))
(defparameter *dumper* (command-line-dumper *args*))
(dispatched-entry-form (dispatched-entries *dumper*))

If you add --dispatched-entry "/shop-app::main" to the arguments, all is well.