component-relative-pathname behavior change breaks closure-html

Bug #620421 reported by Zach Beane
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Medium
Faré

Bug Description

In older ASDF versions, component-relative-pathname had a method for asdf:module objects that returned the directory of the object. For example:

(asdf:component-relative-pathname (asdf:find-system :closure-html)) => #P"/home/xach/src/closure-html/"

In asdf 2, this returns the pathname of the system file:

(asdf:component-relative-pathname (asdf:find-system :closure-html)) => #P"/home/xach/src/closure-html/closure-html.asd"

Closure-html searches for a few data files relative to the result of this function. The data files on disk have no file type, so when merging with this pathname, they get a file type of "asd", which leads to "file not found".

Here's what I'm using as a workaround locally:

(defmethod asdf:component-relative-pathname :around ((component asdf:system))
  (let ((pathname (call-next-method)))
    (pathname (directory-namestring pathname))))

It would be nice if this incompatible change was either fixed or clearly justified.

Revision history for this message
Faré (fahree) wrote :

Oops, it's a bug I introduced when last rewriting determine-system-pathname. Can be fixed there by returning directory-pathname instead of file-pathname in the second or clause.

Will release a fix in 2.121. If you had reported a bit earlier, it could have made it to 2.005, but now that will have to wait for 2.006.

Workaround: do NOT use component-relative-pathname of a find-system. Instead, use system-relative-pathname.

Changed in asdf:
assignee: nobody → Faré (fahree)
importance: Undecided → Medium
milestone: none → version2.1
status: New → Confirmed
Revision history for this message
Faré (fahree) wrote :

Fixed in 2.121. Will be released in 2.006.

Changed in asdf:
status: Confirmed → Fix Committed
Revision history for this message
Faré (fahree) wrote :

Released in 2.006.

Changed in asdf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.