default-source-registry depends on *DEFAULT-PATHNAME-DEFAULTS*

Bug #693933 reported by Thomas M. Hermann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ASDF
Fix Released
Low
Robert P. Goldman

Bug Description

The function default-source-registry creates a :directory entry in the source registry that is constructed from the TRUENAME of the value returned by *DEFAULT-PATHNAME-DEFAULTS*. The first point is that the value *DEFAULT-PATHNAME-DEFAULTS* is implementation dependent. For the cases I tested using CCL 1.6 and LispWorks 6.0.1 on Windows 7, the value is the empty path #P"". The second point is that the pathname returned by TRUENAME when it is given the empty path is implementation dependent. In the case of CCL, (TRUENAME #P"") returns the working directory that was current when Common Lisp was executed. In the case of LispWorks, (TRUENAME #P"") returns #P"C:/Windows/system32/". This may be the working directory that was current when LispWorks was started, but it is clearly not a desirable place for ASDF systems.

A better approach would be to only provide a default :directory entry using feature expressions, like the entry for SBCL. Alternatively, maybe the user-homedir would be the appropriate default. Regardless, defaulting to the TRUENAME of *DEFAULT-PATHNAME-DEFAULTS* is not acceptable.

~ Tom

Revision history for this message
Thomas M. Hermann (thomas-m-hermann) wrote :
Revision history for this message
Faré (fahree) wrote :

*default-pathname-defaults* is the legacy behavior, from way back when Dan Barlow wrote ASDF. I don't feel strongly about this issue, but certainly, nothing should be changed before taking up the discussion on the asdf-devel mailing-list. If/when such discussion happens, I will apply any patch that reaches consensus. But I'm not willing to hack this thing myself, unless the behavior results in an error rather than just a useless result.

Changed in asdf:
importance: Undecided → Low
milestone: none → version2.1
Revision history for this message
Thomas M. Hermann (thomas-m-hermann) wrote :

Sure, I'll collect my thoughts and post it on the asdf-devel list. It doesn't result in an error, but I'm not fond of random directories ending up in the source registry. There is no urgency to correct this, I have my modifications in a local git branch and have no problem working off of that.

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

Also, the condition should probably be the usual ugly
  (and (or win32 windows mswindows mingw32) (not cygwin))
or
  (and (not unix) (not cygwin))
rather than anything implementation dependent.

Revision history for this message
Robert P. Goldman (rpgoldman) wrote :

I looked at the proposed patch, and I was a little confused. It seems like for SBCL, I would get:

~/.sbcl/systems/

But for lispworks and CCL I get only ~. Why not have ~/.lispworks/systems and ~/.ccl/systems ? And if we are going so far as to do that, one could imagine using Fare's code

What bothers me about this is that it will break things for users who are accustomed to finding systems relative to their current working directory, for implementations that put that in the *default-pathname-defaults*. I think Unixish users will find the disregarding of CWD to be an unpleasant change, and I don't see that the proposed change will do enough to make Windows users happy that it's worth it.

In this connection, I consider both LW and CCL to be outliers, in the sense that they are very GUI- (or perhaps that's IDE-) centric implementations. For this reason, disregarding CWD in composing *default-pathname-defaults* may make sense. Similarly, of course, Windows is very GUI-centric, since for whatever reason MS doesn't seem to like people using command-line interfaces.

But perhaps I'm missing something in the rationale... Right now I'm not convinced that the perturbation provides enough benefit.

Revision history for this message
Thomas M. Hermann (thomas-m-hermann) wrote : Re: [Bug 693933] Re: default-source-registry depends on *DEFAULT-PATHNAME-DEFAULTS*
Download full text (3.4 KiB)

Robert,

Thank you for the reply. I made an expanded version of this post to the
asdf-devel list where I discuss not relying on *DEFAULT-PATHNAME-DEFAULTS*
at all in ASDF. I do concede in the post that the benefit may not justify
the change. The benefit in my mind is primarily defined behavior versus
implementation dependent behavior. I'd like to think about it some more and
continue the discussion on asdf-devel.

Thank you,

~ Tom
----------------------------------------------------------------
Thomas M. Hermann
Odonata Research LLC
http://www.odonata-research.com/
http://www.linkedin.com/in/thomasmhermann

On Thu, Dec 23, 2010 at 4:01 PM, Robert P. Goldman <
<email address hidden>> wrote:

> I looked at the proposed patch, and I was a little confused. It seems
> like for SBCL, I would get:
>
> ~/.sbcl/systems/
>
> But for lispworks and CCL I get only ~. Why not have
> ~/.lispworks/systems and ~/.ccl/systems ? And if we are going so far as
> to do that, one could imagine using Fare's code
>
> What bothers me about this is that it will break things for users who
> are accustomed to finding systems relative to their current working
> directory, for implementations that put that in the *default-pathname-
> defaults*. I think Unixish users will find the disregarding of CWD to
> be an unpleasant change, and I don't see that the proposed change will
> do enough to make Windows users happy that it's worth it.
>
> In this connection, I consider both LW and CCL to be outliers, in the
> sense that they are very GUI- (or perhaps that's IDE-) centric
> implementations. For this reason, disregarding CWD in composing
> *default-pathname-defaults* may make sense. Similarly, of course,
> Windows is very GUI-centric, since for whatever reason MS doesn't seem
> to like people using command-line interfaces.
>
> But perhaps I'm missing something in the rationale... Right now I'm not
> convinced that the perturbation provides enough benefit.
>
> --
> You received this bug notification because you are a direct subscriber
> of the bug.
> https://bugs.launchpad.net/bugs/693933
>
> Title:
> default-source-registry depends on *DEFAULT-PATHNAME-DEFAULTS*
>
> Status in Another System Definition Facility:
> New
>
> Bug description:
> The function default-source-registry creates a :directory entry in the
> source registry that is constructed from the TRUENAME of the value returned
> by *DEFAULT-PATHNAME-DEFAULTS*. The first point is that the value
> *DEFAULT-PATHNAME-DEFAULTS* is implementation dependent. For the cases I
> tested using CCL 1.6 and LispWorks 6.0.1 on Windows 7, the value is the
> empty path #P"". The second point is that the pathname returned by TRUENAME
> when it is given the empty path is implementation dependent. In the case of
> CCL, (TRUENAME #P"") returns the working directory that was current when
> Common Lisp was executed. In the case of LispWorks, (TRUENAME #P"") returns
> #P"C:/Windows/system32/". This may be the working directory that was current
> when LispWorks was started, but it is clearly not a desirable place for ASDF
> systems.
>
> A better approach would be to only provide a default :directory entry using
> feature expres...

Read more...

Revision history for this message
Thomas M. Hermann (thomas-m-hermann) wrote :

The default for SBCL, ~/.sbcl/systems/, is defined by SBCL. There is nothing special about user-homedir for lispworks or CCL, I just used that for illustration purposes.

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

Marking as "Opinion". Will probably remain unresolved until more tests are done on more implementations.

I think the way it will go is that we'll define some features like #+asdf-unix and #+asdf-windows, and have slightly different defaults based on that.

Changed in asdf:
status: New → Opinion
Revision history for this message
Faré (fahree) wrote :

"Opinion" apparently seems to mark it as no work needs be done anymore - changing to "Confirmed".

Assigning to rpgoldman.

Changed in asdf:
assignee: nobody → Robert P. Goldman (rpgoldman)
status: Opinion → Confirmed
Revision history for this message
Faré (fahree) wrote :

Somewhere along the way of the massive 2.26.x cleanup, I removed any such default directory from the source-registry. As for the central-registry, I see that *default-pathname-defaults* has been the documented default forever. I propose we kill it, but I want to leave more time to users for that.

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

Fix released in 2.27

Faré (fahree)
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.