Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-11 Thread Gary King
Hi Daniel, I like your sketch but wonder about adding a second interface without removing the first. Since we shouldn't remove the first for both backwards compat and special variable goodness, I learn towards keeping things the same and running the checks late. On Jul 10, 2009, at 11:37 PM

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Daniel Herring
2009/7/10 Stelian Ionescu : > On Tue, 2009-07-07 at 12:31 +0200, Tobias C. Rittweiler wrote: >> I think it's bitten pretty much all of us that we at least once tried to >> push a non-directory-designating filename to *CENTRAL-REGISTRY*. >> >> It's a common pitfalls for newcomers. >> >> Couldn't ASD

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Robert Goldman
Stelian Ionescu wrote: > On Tue, 2009-07-07 at 12:31 +0200, Tobias C. Rittweiler wrote: >> I think it's bitten pretty much all of us that we at least once tried to >> push a non-directory-designating filename to *CENTRAL-REGISTRY*. >> >> It's a common pitfalls for newcomers. >> >> Couldn't ASDF sig

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Faré
2009/7/10 Stelian Ionescu : > On Tue, 2009-07-07 at 12:31 +0200, Tobias C. Rittweiler wrote: >> I think it's bitten pretty much all of us that we at least once tried to >> push a non-directory-designating filename to *CENTRAL-REGISTRY*. >> >> It's a common pitfalls for newcomers. >> >> Couldn't ASD

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Stelian Ionescu
On Tue, 2009-07-07 at 12:31 +0200, Tobias C. Rittweiler wrote: > I think it's bitten pretty much all of us that we at least once tried to > push a non-directory-designating filename to *CENTRAL-REGISTRY*. > > It's a common pitfalls for newcomers. > > Couldn't ASDF signal a warning when it encount

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Gary King
> I believe that FILE-NAMESTRING is supposed to do roughly what you want > here. > excellent! >> (defun ensure-directory-pathname (pathname) >> (if (directory-pathname-p pathname) >> pathname >> (make-pathname >>:directory `(,@(pathname-directory pathname) >>

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Richard M Kreuter
Gary King writes: > > (defun pathname-name+type (pathname) >"Returns a new pathname consisting of only the name and type from > a non-wild pathname." >(make-pathname :name (pathname-name pathname) > :type (pathname-type pathname))) I believe that FILE-NAMESTRING is suppo

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Gary King
New (more complicate) code: (defun directory-pathname-p (pathname) (and (member (pathname-name pathname) (list nil :unspecific)) (member (pathname-type pathname) (list nil :unspecific (defun pathname-name+type (pathname) "Returns a new pathname consisting of only the name and ty

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-10 Thread Gary King
>> >> Couldn't ASDF signal a warning when it encounters such a thing while >> grovelling through the registry? > > Wouldn't it be more user-friendly to coerce such pathnames to ones > that > denote directory names? It sounds like there are two questions: * How to inform the user that something

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-09 Thread Tobias C. Rittweiler
Richard M Kreuter writes: > Wouldn't it be more user-friendly to coerce such pathnames to ones that > denote directory names? Small addendum to my previous mail: Even in the case of automatic coercing, I think ASDF should signal a style-warning for educational purposes. -T.

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-09 Thread Tobias C. Rittweiler
Richard M Kreuter writes: > "Tobias C. Rittweiler" writes: > > > I think it's bitten pretty much all of us that we at least once tried to > > push a non-directory-designating filename to *CENTRAL-REGISTRY*. > > > > It's a common pitfalls for newcomers. > > > > Couldn't ASDF signal a warning whe

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-09 Thread Richard M Kreuter
"Tobias C. Rittweiler" writes: > > I think it's bitten pretty much all of us that we at least once tried to > push a non-directory-designating filename to *CENTRAL-REGISTRY*. > > It's a common pitfalls for newcomers. > > Couldn't ASDF signal a warning when it encounters such a thing while > grov

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-09 Thread Robert Goldman
Gary King wrote: > How about this: > >> (defun directory-pathname-p (pathname) >> (and (member (pathname-name pathname) (list nil :unspecified)) >>(member (pathname-type pathname) (list nil :unspecified >> >> (defun sysdef-central-registry-search (system) >> (let ((name (coerce-nam

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-09 Thread Gary King
How about this: > > (defun directory-pathname-p (pathname) > (and (member (pathname-name pathname) (list nil :unspecified)) >(member (pathname-type pathname) (list nil :unspecified > > (defun sysdef-central-registry-search (system) > (let ((name (coerce-name system)) > (to-re

Re: [asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-07 Thread Gary King
Hi Tobias, I think this would be a good thing. On Jul 7, 2009, at 6:31 AM, Tobias C. Rittweiler wrote: > > I think it's bitten pretty much all of us that we at least once > tried to > push a non-directory-designating filename to *CENTRAL-REGISTRY*. > > It's a common pitfalls for newcomers. > >

[asdf-devel] Guard against (push "/foo/bar" asdf:*central-registry*)

2009-07-07 Thread Tobias C. Rittweiler
I think it's bitten pretty much all of us that we at least once tried to push a non-directory-designating filename to *CENTRAL-REGISTRY*. It's a common pitfalls for newcomers. Couldn't ASDF signal a warning when it encounters such a thing while grovelling through the registry? -T. _