Skip to content

Commit 25c9378

Browse files
committed
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.
1 parent dae5dec commit 25c9378

File tree

6 files changed

+31
-12
lines changed

6 files changed

+31
-12
lines changed

Makefile

+10-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# pgloader build tool
22
APP_NAME = pgloader
3-
VERSION = 3.6.0
3+
VERSION = 3.6.1
44

55
# use either sbcl or ccl
66
CL = sbcl
@@ -24,7 +24,7 @@ QLDIR = $(BUILDDIR)/quicklisp
2424
MANIFEST = $(BUILDDIR)/manifest.ql
2525
LATEST = $(BUILDDIR)/pgloader-latest.tgz
2626

27-
BUNDLEDIST = 2018-10-18
27+
BUNDLEDIST = 2019-01-07
2828
BUNDLENAME = pgloader-bundle-$(VERSION)
2929
BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME)
3030
BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz
@@ -99,8 +99,11 @@ clones: $(QLDIR)/local-projects/cl-ixf \
9999
$(QLDIR)/local-projects/cl-csv \
100100
$(QLDIR)/local-projects/qmynd ;
101101

102-
$(LIBS): $(QLDIR)/setup.lisp clones
102+
$(LIBS): $(QLDIR)/setup.lisp
103103
$(CL) $(CL_OPTS) --load $(QLDIR)/setup.lisp \
104+
--eval '(push :pgloader-image *features*)' \
105+
--eval '(setf *print-circle* t *print-pretty* t)' \
106+
--eval '(ql:quickload "pgloader")' \
104107
--eval '(push "$(PWD)/" ql:*local-project-directories*)' \
105108
--eval '(ql:quickload "pgloader")' \
106109
--eval '(quit)'
@@ -141,8 +144,11 @@ $(PGLOADER): $(MANIFEST) $(BUILDAPP) $(LISP_SRC)
141144
--manifest-file $(MANIFEST) \
142145
--asdf-tree $(QLDIR)/dists \
143146
--asdf-path . \
144-
--load-system $(APP_NAME) \
147+
--load-system cffi \
148+
--load-system cl+ssl \
149+
--load-system mssql \
145150
--load src/hooks.lisp \
151+
--load-system $(APP_NAME) \
146152
--entry pgloader:main \
147153
--dynamic-space-size $(DYNSIZE) \
148154
$(COMPRESS_CORE_OPT) \

bundle/Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,12 @@ $(PGLOADER): $(BUILDAPP)
4848
$(BUILDAPP_OPTS) \
4949
--sbcl $(CL) \
5050
--asdf-tree . \
51+
--load-system cffi \
52+
--load-system cl+ssl \
53+
--load-system mssql \
54+
--load $(SRCDIR)/src/hooks.lisp \
5155
--load-system $(APP_NAME) \
5256
--eval '(setf pgloader.params::*version-string* "$(VERSION)")' \
53-
--load $(SRCDIR)/src/hooks.lisp \
5457
--entry pgloader:main \
5558
--dynamic-space-size $(DYNSIZE) \
5659
$(COMPRESS_CORE_OPT) \

src/hooks.lisp

+7-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
;;; :cl+ssl in its system definition.
1010
;;;
1111

12+
(in-package #:cl-user)
13+
1214
;; So that we can #+pgloader-image some code away, see main.lisp
1315
(push :pgloader-image *features*)
1416

@@ -18,9 +20,6 @@
1820
;;;
1921
(setf *print-circle* t *print-pretty* t)
2022

21-
22-
(in-package #:cl-user)
23-
2423
(defun close-foreign-libs ()
2524
"Close Foreign libs in use by pgloader at application save time."
2625
(let (#+sbcl (sb-ext:*muffled-warnings* 'style-warning))
@@ -47,6 +46,10 @@
4746
;;; Register all loaded systems in the image, so that ASDF don't search for
4847
;;; them again when doing --self-upgrade
4948
;;;
49+
50+
;;; FIXME: this idea kept failing.
51+
52+
#|
5053
(defun register-preloaded-system (system)
5154
(unless (string= "pgloader" (asdf::coerce-name system))
5255
(let ((version (slot-value system 'asdf::version)))
@@ -64,3 +67,4 @@
6467
(asdf:find-system system-name)))
6568
when (typep o 'asdf:load-source-op)
6669
append (asdf:input-files o c)))
70+
|#

src/main.lisp

+5
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,11 @@
243243

244244
;; Then process options
245245
(when debug
246+
(format t "pgloader version ~a~%" *version-string*)
247+
#+pgloader-image
248+
(format t "compiled with ~a ~a~%"
249+
(lisp-implementation-type)
250+
(lisp-implementation-version))
246251
#+sbcl
247252
(format t "sb-impl::*default-external-format* ~s~%"
248253
sb-impl::*default-external-format*)

src/params.lisp

+3-3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040

4141
(in-package :pgloader.params)
4242

43-
(defparameter *release* nil
43+
(defparameter *release* t
4444
"non-nil when this build is a release build.")
4545

46-
(defparameter *major-version* "3.5")
47-
(defparameter *minor-version* "2")
46+
(defparameter *major-version* "3.6")
47+
(defparameter *minor-version* "1")
4848

4949
(defun git-hash ()
5050
"Return the current abbreviated git hash of the development tree."

src/utils/monitor.lisp

+2-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,8 @@
214214
(start
215215
(when (start-start-logger event)
216216
(pgloader.logs:start-logger))
217-
(cl-log:log-message :info "Starting monitor"))
217+
(cl-log:log-message :info "Starting monitor")
218+
(cl-log:log-message :log "pgloader version ~s" *version-string*))
218219

219220
(stop
220221
(cl-log:log-message :info "Stopping monitor")

0 commit comments

Comments
 (0)