From d4429107a691bb93aea2c74a016a3661c82035b3 Mon Sep 17 00:00:00 2001 From: Jan Moringen Date: Mon, 1 Jul 2019 18:13:33 +0200 Subject: [PATCH] Backport: Compute truenames of commandline-supplied files in src/commands/functions-input.lisp Otherwise `recipe-name' may not work. * src/commands/functions-input.lisp (collect-inputs): for existing files, return the `truename' * src/model/project/concrete-syntax/recipe-repository.lisp (recipe-name recipe-repository t pathname): assert that the recipe path is an absolute pathname (cherry picked from commit 2395e482eeb02bd808271d85b2499b3d0d0604f2) --- src/commands/functions-input.lisp | 6 +++--- src/model/project/concrete-syntax/recipe-repository.lisp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/commands/functions-input.lisp b/src/commands/functions-input.lisp index b7cc6c36..addab737 100644 --- a/src/commands/functions-input.lisp +++ b/src/commands/functions-input.lisp @@ -11,11 +11,11 @@ ((wild-pathname-p spec) (directory spec)) ((pathnamep spec) - (unless (probe-file spec) + (if-let ((truename (probe-file spec))) + (list truename) (project::object-error (list (list spec "included here" :error)) - "~@" spec)) - (list spec)) + "~@" spec))) (t (error "~@" spec)))) diff --git a/src/model/project/concrete-syntax/recipe-repository.lisp b/src/model/project/concrete-syntax/recipe-repository.lisp index 3552ff46..274538f5 100644 --- a/src/model/project/concrete-syntax/recipe-repository.lisp +++ b/src/model/project/concrete-syntax/recipe-repository.lisp @@ -209,6 +209,7 @@ (defmethod recipe-name ((repository recipe-repository) (kind t) (path pathname)) + (assert (uiop:absolute-pathname-p path)) (let ((directory (recipe-directory kind repository)) (without-type (make-pathname :type nil :defaults path))) (when (uiop:subpathp without-type directory)