Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asdf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tarn Burton
asdf
Commits
08c2dee8
Commit
08c2dee8
authored
7 years ago
by
Francois-Rene Rideau
Browse files
Options
Downloads
Patches
Plain Diff
Only load-asd UIOP when strictly newer than ASDF
parent
d9f2baa8
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
find-system.lisp
+16
-7
16 additions, 7 deletions
find-system.lisp
test/test-utilities.script
+2
-3
2 additions, 3 deletions
test/test-utilities.script
with
18 additions
and
10 deletions
find-system.lisp
+
16
−
7
View file @
08c2dee8
...
...
@@ -142,20 +142,25 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
;; Returns T if everything went right, NIL if the system was an ASDF of the same or older version,
;; that shall not be loaded. Also issue a warning if it was a strictly older version of ASDF.
(
defun
check-not-old-asdf-system
(
name
pathname
)
(
or
(
not
(
equal
name
"asdf"
))
(
or
(
not
(
member
name
'
(
"asdf"
"uiop"
)
:test
'equal
))
(
null
pathname
)
(
let*
((
version-pathname
(
subpathname
pathname
"version.lisp-expr"
))
(
let*
((
asdfp
(
equal
name
"asdf"
))
;; otherwise, it's uiop
(
version-pathname
(
subpathname
pathname
"version"
:type
(
if
asdfp
"lisp-expr"
"lisp"
)))
(
version
(
and
(
probe-file*
version-pathname
:truename
nil
)
(
read-file-form
version-pathname
)))
(
read-file-form
version-pathname
:at
(
if
asdfp
'
(
0
)
'
(
2
2
2
))
)))
(
old-version
(
asdf-version
)))
(
cond
((
version<=
old-version
version
)
t
)
;; newer or same version: good!
;; Don't load UIOP of the exact same version: we already loaded it as part of ASDF.
((
and
(
equal
old-version
version
)
(
equal
name
"uiop"
))
nil
)
((
version<=
old-version
version
)
t
)
;; newer or same version: Good!
(
t
;; old version: bad
(
ensure-gethash
(
list
(
namestring
pathname
)
version
)
*old-asdf-systems*
#'
(
lambda
()
(
let
((
old-pathname
(
system-source-file
(
registered-system
"asdf"
))))
(
warn
"~@<~
(
let
((
old-pathname
(
system-source-file
(
registered-system
"asdf"
))))
(
if
asdfp
(
warn
"~@<~
You are using ASDF version ~A ~:[(probably from (require \"asdf\") ~
or loaded by quicklisp)~;from ~:*~S~] and have an older version of ASDF ~
~:[(and older than 2.27 at that)~;~:*~A~] registered at ~S. ~
...
...
@@ -177,7 +182,11 @@ Do NOT try to load a .asd file directly with CL:LOAD. Always use ASDF:LOAD-ASD."
then you might indeed want to either install and register a more recent version, ~
or use :ignore-inherited-configuration to avoid registering the old one. ~
Please consult ASDF documentation and/or experts.~@:>~%"
old-version
old-pathname
version
pathname
))))
old-version
old-pathname
version
pathname
)
;; NB: for UIOP, don't warn, just ignore.
(
warn
"ASDF ~A (from ~A), UIOP ~A (from ~A)"
old-version
old-pathname
version
pathname
)
))))
nil
)))))
;; only issue the warning the first time, but always return nil
(
defun
locate-system
(
name
)
...
...
This diff is collapsed.
Click to expand it.
test/test-utilities.script
+
2
−
3
View file @
08c2dee8
...
...
@@ -303,15 +303,14 @@
(ensure-directories-exist (subpathname *build-directory* "deleteme/a/b/d/"))
(ensure-directories-exist (subpathname *build-directory* "deleteme/a/b/e/"))
(register-directory *asdf-directory*)
(register-directory *uiop-directory*)
(let ((new-file (subpathname *build-directory* "deleteme/a/1.x")))
(when (probe-file new-file)
(delete-file new-file))
(copy-file (system-source-file :
uiop
) new-file))
(copy-file (system-source-file :
asdf
) new-file))
(let ((new-file (subpathname *build-directory* "deleteme/a/b/2")))
(when (probe-file new-file)
(delete-file new-file))
(copy-file (system-source-file :
uiop
) new-file))
(copy-file (system-source-file :
asdf
) new-file))
(assert (directory-exists-p (subpathname *build-directory* "deleteme/a/b/c/")))
(assert (directory-exists-p (subpathname *build-directory* "deleteme/a/b/d/")))
(assert (directory-exists-p (subpathname *build-directory* "deleteme/a/b/e/")))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment