Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tarn Burton
asdf
Commits
692a2d61
Commit
692a2d61
authored
Apr 01, 2020
by
Francois-Rene Rideau
Browse files
Fix primary-system-name for systems without a source file
parent
0cbeae25
Changes
1
Hide whitespace changes
Inline
Side-by-side
system.lisp
View file @
692a2d61
...
...
@@ -137,16 +137,18 @@ primary system, after which the .asd file in which it is defined is named.
If given a string or symbol (to downcase), do it syntactically
by stripping anything from the first slash on.
If given a component, do it semantically by extracting
the system-primary-system-name of its system."
the system-primary-system-name of its system from its source-file if any,
falling back to the syntactic criterion if none."
(
etypecase
system-designator
(
string
(
if-let
(
p
(
position
#\/
system-designator
))
(
subseq
system-designator
0
p
)
system-designator
))
(
symbol
(
primary-system-name
(
coerce-name
system-designator
)))
(
component
(
let*
((
system
(
component-system
system-designator
))
(
source-file
(
physicalize-pathname
(
system-source-file
system
))))
(
and
source-file
(
equal
(
pathname-type
source-file
)
"asd"
)
(
pathname-name
source-file
))))))
(
if
source-file
(
and
(
equal
(
pathname-type
source-file
)
"asd"
)
(
pathname-name
source-file
))
(
primary-system-name
(
component-name
system
)))))))
(
defun
primary-system-p
(
system
)
"Given a system designator SYSTEM, return T if it designates a primary system, or else NIL.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment