[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.
From: |
Mario Domenech Goulart |
Subject: |
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path. |
Date: |
Tue, 19 Mar 2013 20:55:45 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) |
Hi,
On Tue, 19 Mar 2013 16:44:24 +0100 Peter Bex <address@hidden> wrote:
> On Fri, Mar 15, 2013 at 07:58:02AM +0100, Florian Zumbiehl wrote:
>> Remove ##sys#expand-home-path as shell expansion has no place in a filesystem
>> API.
>
> I've moved the ~ behaviour to a new procedure in "utils" called "ep" and
> updated the NEWS file and docs.
>
> The signed off patch is attached.
>
> I'm not 100% sure how to handle this, as it's a backwards-incompatible
> change. Pushing it as-is could possibly cause breakage in existing
> programs, but it will also fix programs that don't knowingly rely on
> this behaviour.
>
> BTW: This behaviour isn't really compatible with the shell's, since it
> disallows strings formatted like ~username from being expanded to that
> user's homedir. The shell would expand ~ to the current user's homedir
> only in a string where it's immediately succeeded by a slash, like ~/foo.
> This will now expand to the current user's homedir with foo pasted at
> the end, like "/home/peterfoo". I don't know if this is a bug or
> intended behaviour, so I kept it the way it was before.
Thanks. Attached is the patch amended with the following changes:
- Manual: remove "Pathnames expansion" section from the "Extensions to
the standard" chapter
- Remove some trailing whitespaces from the new code
- Mention ep in the commit log
- Fix tests that check the ~-expansion
I haven't pushed this patch, since we don't have a consensus on how to
handle this issue and since it is possible that the fix for it will
cause some breakage. So, I'm afraid we should file a change request.
Here is a summary of options I've collected from this thread:
a. Keep ##sys#expand-home-path, but remove the environment variable
expansion. Keep the ~-expansion.
b. Drop ##sys#expand-home-path. Do not implicitly expand ~ and
environment variables in pathnames. Provide a procedure to expand ~
in pathnames. That's what this patch implements.
c. Drop ##sys#expand-home-path. Do not implicitly expand ~ and
environment variables in pathnames. Provide an egg to implement the
old behavior of the procedures from the filesystem API.
Any other relevant options?
If you think a CR is required, I can create one.
Best wishes.
Mario
--
http://parenteses.org/mario
0001-Remove-sys-expand-home-path.patch
Description: Text Data
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., (continued)
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Florian Zumbiehl, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jörg F . Wittenberger, 2013/03/20
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/18
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jim Ursetto, 2013/03/15
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Felix, 2013/03/16
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Peter Bex, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., John Cowan, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path.,
Mario Domenech Goulart <=
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., John Cowan, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Mario Domenech Goulart, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., John Cowan, 2013/03/19
- Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jim Ursetto, 2013/03/19
Re: [Chicken-hackers] [PATCH 3/4] Remove ##sys#expand-home-path., Jim Ursetto, 2013/03/15
Re: [Chicken-hackers] [PATCH 1/4] csi dirseparator?: don't treat backslash as dir separator on non-windows, Christian Kellermann, 2013/03/15