Verified Commit 28749114 authored by Eric Timmons's avatar Eric Timmons
Browse files

When groveling, ASDF 3.3.5.3 is used in child process

This enables the use of features such as package local nicknames with
UIOP:DEFINE-PACKAGE.

This is a temporary measure until CLPM also tracks the version of ASDF being
actually used.
parent 0d4031c6
......@@ -20,4 +20,5 @@
(:file "quicklisp-bundle")
(:file "global-context")
(:file "grovel-with-require")
(:file "pln-support")
(:file "tests")))
;;;; Interface for caching ASDF
;;;;
;;;; This software is part of CLPM. See README.org for more information. See
;;;; LICENSE for license information.
(uiop:define-package #:clpm/asdf
(:use #:cl
#:clpm/cache)
(:export #:asdf-installed-pathname
#:install-asdf-to-cache))
(in-package #:clpm/asdf)
(defparameter *asdf.lisp*
(alexandria:read-file-into-string (asdf:system-relative-pathname :asdf "build/asdf.lisp")))
(defun asdf-installed-pathname ()
"Return the pathname where we would expect to find asdf.lisp installed in
CLPM's cache."
(clpm-cache-pathname `("asdf" ,(asdf:asdf-version) "asdf.lisp")))
(defun install-asdf-to-cache (&key forcep)
(let ((pn (asdf-installed-pathname)))
(ensure-directories-exist pn)
(with-open-file (s pn :direction :output :if-exists (if forcep :supersede nil))
(unless (null s)
(write-string *asdf.lisp* s)))))
......@@ -8,6 +8,7 @@
(:use #:cl
#:anaphora
#:asdf-system-groveler
#:clpm/asdf
#:clpm/config
#:clpm/log
#:clpm/sandbox
......@@ -54,7 +55,9 @@
(command-list (unless (null command-string) (shlex:split command-string))))
(flet ((rewrite (args)
(sandbox-augment-command args :read-write-pathnames (list dir))))
(install-asdf-to-cache)
(aprog1 (asdf-system-groveler:make-groveler (get-groveler-implementation)
:asdf-pathname (asdf-installed-pathname)
:lisp-path (first command-list)
:lisp-args (rest command-list)
:asdf-fasl-cache-dir dir
......
Subproject commit 11a691c03eba55b718a154b673a7b77eb63eb244
Subproject commit 30ed7a139690d61efb7fb1959d863dfb2a9ff7d7
Subproject commit ef2a5335a5d0ad9cd6b65a3fac3fa04ffd894d33
Subproject commit 63a00f0ea68059ec245e9565fd2d265932ddf556
(in-package #:clpm-test)
(para:define-test pln-support-with-uiop-define-package
(uiop:with-current-directory ((asdf:system-relative-pathname :clpm "test/pln-support/"))
(with-clpm-env ()
(clpm '("bundle" "install" "-y")
:output :interactive
:error-output :interactive)
(clpm `("bundle" "exec"
"--"
"sbcl" "--non-interactive" "--no-userinit" "--no-sysinit"
"--load" ,(uiop:native-namestring (asdf:system-relative-pathname :asdf "build/asdf.lisp"))
"--eval" "(asdf:load-system :pln-support)"
"--quit")
:output :interactive
:error-output :interactive))))
;;; -*- mode: common-lisp -*-
(:api-version "0.3")
(:source "quicklisp"
:type :quicklisp
:url "http://localhost:8091/dist/quicklisp-test.txt")
(:asd "pln-support.asd")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; This is autogenerated by CLPM. Do not edit by hand.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(:api-version "0.4")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN SOURCES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:sources
(:implicit-file :type :file-system :system-files ("pln-support.asd"))
("quicklisp" :url "http://localhost:8091/dist/quicklisp-test.txt" :type
:quicklisp)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN REQUIREMENTS
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:requirements
(:asd-file :name "pln-support.asd")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN RELEASES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:releases
("alexandria" :version "2021-02-21" :source "quicklisp" :systems ("alexandria"))
("pln-support.asd" :version :newest :source :implicit-file :systems
("pln-support" "pln-support/pln-support"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; BEGIN REVERSE-DEPENDENCIES
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:reverse-dependencies
("alexandria"
((:system :name "pln-support/pln-support") (:system :name "alexandria")))
("pln-support.asd"
((:system :name "pln-support") (:system :name "pln-support/pln-support"))
(t (:asd-file :name "pln-support.asd")))
(asdf:defsystem "pln-support"
:class :package-inferred-system
:depends-on (#:pln-support/pln-support))
(uiop:define-package #:pln-support/pln-support
(:nicknames #:pln-support)
(:use #:cl
#:alexandria)
(:local-nicknames (#:alex #:alexandria)))
(in-package #:pln-support)
(assert (equal (alex:iota 3) '(0 1 2)))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment