Fix building for 3.6.1.

The pgloader-image feature must be added in the lisp image before
reading/compiling the pgloader sources for it to be useful.
This commit is contained in:
Dimitri Fontaine 2019-01-21 15:02:39 +01:00
parent dae5dec03c
commit 25c937879a
6 changed files with 31 additions and 12 deletions

View File

@ -1,6 +1,6 @@
# pgloader build tool
APP_NAME = pgloader
VERSION = 3.6.0
VERSION = 3.6.1
# use either sbcl or ccl
CL = sbcl
@ -24,7 +24,7 @@ QLDIR = $(BUILDDIR)/quicklisp
MANIFEST = $(BUILDDIR)/manifest.ql
LATEST = $(BUILDDIR)/pgloader-latest.tgz
BUNDLEDIST = 2018-10-18
BUNDLEDIST = 2019-01-07
BUNDLENAME = pgloader-bundle-$(VERSION)
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
@ -99,8 +99,11 @@ clones: $(QLDIR)/local-projects/cl-ixf \
$(QLDIR)/local-projects/cl-csv \
$(QLDIR)/local-projects/qmynd ;
$(LIBS): $(QLDIR)/setup.lisp clones
$(LIBS): $(QLDIR)/setup.lisp
$(CL) $(CL_OPTS) --load $(QLDIR)/setup.lisp \
--eval '(push :pgloader-image *features*)' \
--eval '(setf *print-circle* t *print-pretty* t)' \
--eval '(ql:quickload "pgloader")' \
--eval '(push "$(PWD)/" ql:*local-project-directories*)' \
--eval '(ql:quickload "pgloader")' \
--eval '(quit)'
@ -141,8 +144,11 @@ $(PGLOADER): $(MANIFEST) $(BUILDAPP) $(LISP_SRC)
--manifest-file $(MANIFEST) \
--asdf-tree $(QLDIR)/dists \
--asdf-path . \
--load-system $(APP_NAME) \
--load-system cffi \
--load-system cl+ssl \
--load-system mssql \
--load src/hooks.lisp \
--load-system $(APP_NAME) \
--entry pgloader:main \
--dynamic-space-size $(DYNSIZE) \
$(COMPRESS_CORE_OPT) \

View File

@ -48,9 +48,12 @@ $(PGLOADER): $(BUILDAPP)
$(BUILDAPP_OPTS) \
--sbcl $(CL) \
--asdf-tree . \
--load-system cffi \
--load-system cl+ssl \
--load-system mssql \
--load $(SRCDIR)/src/hooks.lisp \
--load-system $(APP_NAME) \
--eval '(setf pgloader.params::*version-string* "$(VERSION)")' \
--load $(SRCDIR)/src/hooks.lisp \
--entry pgloader:main \
--dynamic-space-size $(DYNSIZE) \
$(COMPRESS_CORE_OPT) \

View File

@ -9,6 +9,8 @@
;;; :cl+ssl in its system definition.
;;;
(in-package #:cl-user)
;; So that we can #+pgloader-image some code away, see main.lisp
(push :pgloader-image *features*)
@ -18,9 +20,6 @@
;;;
(setf *print-circle* t *print-pretty* t)
(in-package #:cl-user)
(defun close-foreign-libs ()
"Close Foreign libs in use by pgloader at application save time."
(let (#+sbcl (sb-ext:*muffled-warnings* 'style-warning))
@ -47,6 +46,10 @@
;;; Register all loaded systems in the image, so that ASDF don't search for
;;; them again when doing --self-upgrade
;;;
;;; FIXME: this idea kept failing.
#|
(defun register-preloaded-system (system)
(unless (string= "pgloader" (asdf::coerce-name system))
(let ((version (slot-value system 'asdf::version)))
@ -64,3 +67,4 @@
(asdf:find-system system-name)))
when (typep o 'asdf:load-source-op)
append (asdf:input-files o c)))
|#

View File

@ -243,6 +243,11 @@
;; Then process options
(when debug
(format t "pgloader version ~a~%" *version-string*)
#+pgloader-image
(format t "compiled with ~a ~a~%"
(lisp-implementation-type)
(lisp-implementation-version))
#+sbcl
(format t "sb-impl::*default-external-format* ~s~%"
sb-impl::*default-external-format*)

View File

@ -40,11 +40,11 @@
(in-package :pgloader.params)
(defparameter *release* nil
(defparameter *release* t
"non-nil when this build is a release build.")
(defparameter *major-version* "3.5")
(defparameter *minor-version* "2")
(defparameter *major-version* "3.6")
(defparameter *minor-version* "1")
(defun git-hash ()
"Return the current abbreviated git hash of the development tree."

View File

@ -214,7 +214,8 @@
(start
(when (start-start-logger event)
(pgloader.logs:start-logger))
(cl-log:log-message :info "Starting monitor"))
(cl-log:log-message :info "Starting monitor")
(cl-log:log-message :log "pgloader version ~s" *version-string*))
(stop
(cl-log:log-message :info "Stopping monitor")