Skip to content

Commit bb06913

Browse files
committed
Fix more things broken by the refactoring of xcvb-driver into uiop.
1 parent edc4d53 commit bb06913

File tree

7 files changed

+41
-44
lines changed

7 files changed

+41
-44
lines changed

asdf-condition-control.asd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
;;; -*- mode: lisp -*-
2-
;;; superseded by asdf-driver
2+
;;; Superseded by UIOP
33
(in-package :asdf)
44

55
(defsystem :asdf-condition-control
@@ -9,4 +9,4 @@
99
:licence "MIT"
1010
:description "Condition control for ASDF"
1111
:long-description "Using XCVB's condition control for ASDF"
12-
:depends-on (:asdf #-asdf3 :asdf-driver))
12+
:depends-on (:asdf #-asdf3 :uiop))

asdf-condition-control.lisp

Lines changed: 0 additions & 25 deletions
This file was deleted.

bootstrap.lisp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
(run-program
3232
(lisp-invocation:lisp-invocation-arglist
3333
:implementation-type lisp
34-
:eval (format nil "(#.(require \"asdf\")#.(asdf:load-system :asdf)#.(asdf:load-system :xcvb-driver)#.(xcvb-driver:with-coded-exit () (asdf:load-system :xcvb) (funcall 'xcvb-driver::dump-xcvb ~S))" program))
34+
:eval (format nil "(#.(require \"asdf\")#.(asdf:load-system :asdf)#.(asdf:load-system :xcvb-driver)#.(uiop:with-fatal-condition-handler () (asdf:load-system :xcvb) (funcall 'xcvb-driver::dump-xcvb ~S))" program))
3535
:output nil) ;; for side-effects
3636
(native-namestring program)))
3737

driver.lisp

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
(in-package :cl-user)
1717

1818
(eval-when (:compile-toplevel :load-toplevel :execute)
19-
(defparameter *asdf-version-required-by-xcvb* "3.0.1.6")
19+
(defparameter *asdf-version-required-by-xcvb* "3.0.1.7")
2020
(defvar *asdf-directory*
2121
(merge-pathnames #p"cl/asdf/" (user-homedir-pathname))
2222
"Directory in which your favorite and/or latest version
@@ -88,8 +88,8 @@ Please upgrade to the latest stable ASDF and register it in your source-registry
8888

8989
(asdf/package:define-package :xcvb-driver
9090
(:nicknames :xcvbd :xd)
91-
(:use :asdf/common-lisp :asdf/driver :asdf)
92-
(:reexport :asdf/driver)
91+
(:use :uiop/common-lisp :uiop :asdf)
92+
(:reexport :uiop)
9393
(:shadow #:create-image)
9494
(:export
9595
;;; special variables shared with XCVB itself
@@ -386,21 +386,40 @@ Entry point for XCVB-DRIVER when used by XCVB's farmer"
386386
(defmacro run (&rest commands)
387387
"Run a series of XCVB-DRIVER commands, then exit.
388388
Entry point for XCVB-DRIVER when used by XCVB"
389-
`(with-coded-exit ()
390-
(do-run ',commands)))
389+
`(with-fatal-condition-handler ()
390+
(do-run ',commands)))
391391

392392

393393
;;;; ----- Simple build commands -----
394394

395395
;;; Loading and evaluating code
396396

397+
(defun do-load (x &key encoding)
398+
(with-muffled-loader-conditions ()
399+
(load* x
400+
:external-format (encoding-external-format (or encoding *default-encoding*))
401+
:verbose (>= *xcvb-verbosity* 8)
402+
:print (>= *xcvb-verbosity* 9))))
403+
404+
(defun load-file (x &key encoding)
405+
(with-profiling `(:load-file ,x :encoding ,encoding)
406+
(unless (do-load x :encoding encoding)
407+
(error "Failed to load ~A" (list x)))))
408+
409+
397410
(defun cl-require (x)
398411
(with-profiling `(:require ,x)
399412
(require x)))
400413

401414

402415
;;; ASDF support
403416

417+
(defun load-asdf (x &key parallel (verbose *compile-verbose*)) ;; parallel loading requires POIU
418+
(when parallel (asdf:load-system :poiu))
419+
(with-profiling `(:asdf ,x)
420+
(with-muffled-loader-conditions ()
421+
(load-system x :verbose verbose))))
422+
404423
(defun initialize-asdf (&key source-registry output-translations)
405424
(asdf:clear-configuration)
406425
(asdf:initialize-source-registry source-registry)
@@ -482,7 +501,7 @@ Entry point for XCVB-DRIVER when used by XCVB"
482501
(lambda ()
483502
(apply 'compile-file* source
484503
:output-file (merge-pathnames* fasl)
485-
:external-format (encoding-external-format encoding)
504+
:external-format (encoding-external-format (or encoding *default-encoding*))
486505
:warnings-file warnings-file
487506
(append
488507
#+sbcl (when cfasl `(:emit-cfasl ,(merge-pathnames* cfasl)))

grain-implementation.lisp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939

4040
(defun read-module-declaration (path)
4141
(let ((*features* (list :xcvb)))
42-
(read-file-form path :package :xcvb-user)))
42+
(with-safe-io-syntax (:package :xcvb-user)
43+
(read-file-form path))))
4344

4445
(defun grain-from-file-declaration (path &key build-p)
4546
(log-format 10 " Creating grain from declarations in file at ~S~%" path)

pkgdcl.lisp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
#+xcvb
22
(module
33
(:description "package for XCVB"
4-
:depends-on ("lisp-invocation" "version" "xcvb-utils")))
4+
:depends-on ("/asdf" "/fare-utils" "/inferior-shell" (:asdf "alexandria")
5+
"lisp-invocation" "version")))
56

6-
(in-package :asdf-driver)
7+
(in-package :uiop)
78

89
(eval-when (:compile-toplevel :load-toplevel :execute)
910
(setf *optimization-settings*
1011
`((speed 2) (safety 3) (compilation-speed 0) (debug 3)))
1112
(proclaim-optimization-settings))
1213

1314
(define-package :xcvb
14-
(:mix :fare-utils :asdf/driver :alexandria :inferior-shell :xcvb-driver)
15+
(:mix :fare-utils :uiop :alexandria :inferior-shell :xcvb-driver)
1516
(:use :closer-common-lisp
1617
:command-line-arguments :lisp-invocation
17-
:optima :interface :pure :fare-mop
18-
:fare-memoization
19-
#+xcvb-farmer :quux-iolib #+xcvb-farmer :iolib.os)
18+
:optima :interface :pure :fare-mop
19+
:fare-memoization
20+
#+xcvb-farmer :quux-iolib #+xcvb-farmer :iolib.os)
2021

2122
(:import-from :asdf
2223
#:*default-source-registry-exclusions*
@@ -37,5 +38,6 @@
3738
#:module ;; Defining and using modules and extensions
3839
#:cmd)) ;; Easy REPL access to the command-line interface
3940

40-
(defpackage :xcvb-user
41-
(:use :closer-common-lisp :xcvb-driver :xcvb))
41+
(define-package :xcvb-user
42+
(:use :closer-common-lisp)
43+
(:mix :uiop :xcvb-driver :xcvb))

xcvb.asd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
XCVB provides a scalable system to build large software in Lisp, featuring
2626
deterministic separate compilation and enforced locally-declared dependencies."
2727
:defsystem-depends-on (:asdf :xcvb-driver :xcvb-bootstrap)
28-
:depends-on ((:version :asdf "3.0.1.6")
28+
:depends-on ((:version :asdf "3.0.1.7")
2929
:xcvb-driver :xcvb-bootstrap :asdf-encodings
3030
:lambda-reader
3131
:fare-mop :fare-memoization

0 commit comments

Comments
 (0)