Shirakumo / radiance

A Common Lisp web application environment
https://shirakumo.github.io/radiance/
zlib License
322 stars 19 forks source link

QUICKLISP-QUICKSTART #36

Closed GertThiel closed 5 years ago

GertThiel commented 5 years ago

Hi Nicolas.

The TechEmpower Framework Benchmark (or TFB for short) guides many people who are looking for a web framework for their next project. Common Lisp was totally absent until now.

Last weekend I finished adding Eitaro Fukamachi's Woo to the TFB (pull requests 4684 and 4690).

Now I'm adding Radiance to the TFB, an endeavor giving me plenty of headaches.

TFB is quite demanding e.g. runs every framework to run in a Docker container.

Until now I tried two approaches: Modern Common Lisp best practices using Roswell and Qlot (see in my repository) and your radiance-bootstrap.lisp (see in my repository).

After reading some of the provided documentation I got the impression that radiance-bootstrap.lisp would be the more idiomatic way to go. So I bootstrapped Radiance and run ros run -- --script start.lisp and got this:

To load "radiance":
  Load 1 ASDF system:
    radiance
; Loading "radiance"
[package trivial-indent]..........................
[package documentation-utils].....................
[package modularize]..............................
[package org.shirakumo.radiance.lib.modularize.user].
..................................................
[package closer-mop]..............................
[package closer-common-lisp]......................
[package closer-common-lisp-user].................
[package trivial-arguments].......................
[package lambda-fiddle]...........................
[package modularize-hooks]........................
[package modularize-interfaces]...................
[package ubiquitous]..............................
[package alexandria.0.dev]........................
[package bordeaux-threads]........................
[package cl-ppcre]................................
..................................................
[package trivial-mimes]...........................
[package cl-fad]..................................
[package path]....................................
[package local-time]..............................
[package form-fiddle].............................
[package babel-encodings].........................
[package babel]...................................
..................................................
[package puri]....................................
........................
Unhandled UBIQUITOUS:BAD-CONFIGURATION-PACKAGE in thread #<SB-THREAD:THREAD "main thread" RUNNING
                                                            {10005385B3}>:
  The configuration metadata specifies a package named "QUICKLISP-QUICKSTART".
However, no package of this name exists in the current system.

Backtrace for: #<SB-THREAD:THREAD "main thread" RUNNING {10005385B3}>
0: (SB-DEBUG::DEBUGGER-DISABLED-HOOK #<UBIQUITOUS:BAD-CONFIGURATION-PACKAGE {1004A86443}> #<unused argument> :QUIT T)
1: (SB-DEBUG::RUN-HOOK SB-EXT:*INVOKE-DEBUGGER-HOOK* #<UBIQUITOUS:BAD-CONFIGURATION-PACKAGE {1004A86443}>)
2: (INVOKE-DEBUGGER #<UBIQUITOUS:BAD-CONFIGURATION-PACKAGE {1004A86443}>)
3: (ERROR UBIQUITOUS:BAD-CONFIGURATION-PACKAGE :PACKAGE-NAME "QUICKLISP-QUICKSTART")
4: (UBIQUITOUS:FIND-METADATA-PACKAGE "QUICKLISP-QUICKSTART")
5: (UBIQUITOUS:PROCESS-METADATA (:VERSION 1.0 :PACKAGE "QUICKLISP-QUICKSTART"))
6: ((:METHOD UBIQUITOUS:READ-STORAGE ((EQL :LISP) T)) #<unused argument> #<SB-SYS:FD-STREAM for "file /Users/gertthiel/Documents/Projekte/GertThiel/FrameworkBenchmarks/frameworks/Lisp/radiance-bootstrapped/config/default/radiance-core/radiance-core.conf.lisp" {1004862833}>) [fast-method]
7: ((:METHOD UBIQUITOUS:RESTORE NIL) #<PACKAGE "RADIANCE-CORE"> :LISP) [fast-method]
8: ((LAMBDA NIL :IN UBIQUITOUS:RESTORE))
9: (UBIQUITOUS::CALL-WITH-OBJECT-LOCKED #<CLOSURE (LAMBDA NIL :IN UBIQUITOUS:RESTORE) {1004439CCB}> #<HASH-TABLE :TEST EQUAL :COUNT 0 {1004E92B03}>)
10: ((SETF RADIANCE-CORE:ENVIRONMENT) "default")
11: (RADIANCE-CORE:STARTUP "default")
12: (SB-INT:SIMPLE-EVAL-IN-LEXENV (RADIANCE-CORE:STARTUP) #<NULL-LEXENV>)
13: (SB-EXT:EVAL-TLF (RADIANCE-CORE:STARTUP) 15 NIL)
14: ((LABELS SB-FASL::EVAL-FORM :IN SB-INT:LOAD-AS-SOURCE) (RADIANCE-CORE:STARTUP) 15)
15: ((LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) (RADIANCE-CORE:STARTUP) :CURRENT-INDEX 15)
16: (SB-C::%DO-FORMS-FROM-INFO #<CLOSURE (LAMBDA (SB-KERNEL:FORM &KEY :CURRENT-INDEX &ALLOW-OTHER-KEYS) :IN SB-INT:LOAD-AS-SOURCE) {1001897A4B}> #<SB-C::SOURCE-INFO {1001897A03}> SB-C::INPUT-ERROR-IN-LOAD)
17: (SB-INT:LOAD-AS-SOURCE #<SB-SYS:FD-STREAM for "file /Users/gertthiel/Documents/Projekte/GertThiel/FrameworkBenchmarks/frameworks/Lisp/radiance-bootstrapped/start.lisp" {100188A173}> :VERBOSE NIL :PRINT NIL :CONTEXT "loading")
18: ((FLET SB-FASL::THUNK :IN LOAD))
19: (SB-FASL::CALL-WITH-LOAD-BINDINGS #<CLOSURE (FLET SB-FASL::THUNK :IN LOAD) {19FF69B}> #<SB-SYS:FD-STREAM for "file /Users/gertthiel/Documents/Projekte/GertThiel/FrameworkBenchmarks/frameworks/Lisp/radiance-bootstrapped/start.lisp" {100188A173}>)
20: ((FLET SB-FASL::LOAD-STREAM :IN LOAD) #<SB-SYS:FD-STREAM for "file /Users/gertthiel/Documents/Projekte/GertThiel/FrameworkBenchmarks/frameworks/Lisp/radiance-bootstrapped/start.lisp" {100188A173}> NIL)
21: (LOAD #<SB-SYS:FD-STREAM for "file /Users/gertthiel/Documents/Projekte/GertThiel/FrameworkBenchmarks/frameworks/Lisp/radiance-bootstrapped/start.lisp" {100188A173}> :VERBOSE NIL :PRINT NIL :IF-DOES-NOT-EXIST T :EXTERNAL-FORMAT :DEFAULT)
22: ((FLET SB-IMPL::LOAD-SCRIPT :IN SB-IMPL::PROCESS-SCRIPT) #<SB-SYS:FD-STREAM for "file /Users/gertthiel/Documents/Projekte/GertThiel/FrameworkBenchmarks/frameworks/Lisp/radiance-bootstrapped/start.lisp" {100188A173}>)
23: ((FLET SB-UNIX::BODY :IN SB-IMPL::PROCESS-SCRIPT))
24: ((FLET "WITHOUT-INTERRUPTS-BODY-2" :IN SB-IMPL::PROCESS-SCRIPT))
25: (SB-IMPL::PROCESS-SCRIPT "start.lisp")
26: (SB-IMPL::TOPLEVEL-INIT)
27: ((FLET SB-UNIX::BODY :IN SB-EXT:SAVE-LISP-AND-DIE))
28: ((FLET "WITHOUT-INTERRUPTS-BODY-14" :IN SB-EXT:SAVE-LISP-AND-DIE))
29: ((LABELS SB-IMPL::RESTART-LISP :IN SB-EXT:SAVE-LISP-AND-DIE))

unhandled condition in --disable-debugger mode, quitting

Do you have a clue what's went wrong?

Thanks in advance,

Gert

Shinmera commented 5 years ago

Radiance is not a web server like Woo, Wookie, or Hunchentoot. It in fact will simply defer the server operations to one of those three depending on how it is set up.

The bootstrapper is meant as a way to set up a deployment of Radiance on a target server, not as a development environment. I'm not sure which of those is more appropriate for your goal. For the development environment, you should not need to have to do anything outside of running

(ql-dist:install-dist "http://dist.tymoon.eu/shirakumo.txt")
(ql:quickload :radiance)

to install it, and (ql:quickload :radiance) (radiance:startup) to run it any time after.

Regarding your specific error, this appears to be a problem with the bootstrapper. I have since fixed it in Shirakumo/radiance-bootstrap@331c21d

GertThiel commented 5 years ago

Radiance is not a web server like Woo, Wookie, or Hunchentoot. It in fact will simply defer the server operations to one of those three depending on how it is set up.

I know. My code included Woo related configuration already.

Thanks for fixing radiance-bootstrap so quickly! I will try right now.

GertThiel commented 5 years ago

Another question: Can I automate radiance-bootstrap.lisp to include it in a Dockerfile?

Shinmera commented 5 years ago

I don't believe so, unless you provide an automated stdin to answer its prompts, though that does not sound very clean.

It doesn't do very much to begin with. I think, if you operate within docker, using the developmental install should be just fine, and much easier to automate.

GertThiel commented 5 years ago

It's a developing w/ MacOS X vs. running w/ Linux story. I can't just copy the quicklisp directory.

Shinmera commented 5 years ago

My suggestion was to have a script that installs roswell, runs it to install an implementation and quicklisp, then run the implementation to install radiance.

GertThiel commented 5 years ago

BTW: My bootstrapped Radiance runs now.