import paths with spaces

Bug #163717 reported by Derick Eddington
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Released
Medium
Abdulaziz Ghuloum

Bug Description

Say I have a directory filename with spaces in it and I want to import libraries from that directory, I should be able to do:

(import (|Some Dir| my-lib))
    or
(import (Some\x20;Dir my-lib))

but this currently does not work. With the \xXX; it borks on the symbol bug I just reported, and with the |X X| it does:

Unhandled exception
 Condition components:
   1. &error
   2. &message: "cannot find library"
   3. &irritants: ((Ikarus\x20;Misc continuable-interrupts))

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

The library name should ideally describe the functionality of the library, not the location in which it is stored on the file system. The file name is secondary and, eventually, there will be a way to specify your own library->file-name mapping. For now, please use (ikarus-misc continuable-interrupts), without spaces.

There is a usability issue here of course in that ikarus did not tell you *why* it failed and where it looked. I'll fix that. Thanks.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

As of revision 1087:

If you have a script like:

#!/usr/bin/env scheme-script
(import (|some dir| my-lib))

and Ikarus cannot find the library, it will say:

Unhandled exception:
 Condition components:
   1. &error
   2. &who: expander
   3. &message: "cannot locate library in library-path"
   4. &library-resolution:
       library: (some\x20;dir my-lib)
       files: ("./some%20dir/my-lib.ss" "/Users/ikarus/.opt/lib/ikarus/some%20dir/my-lib.ss")

which should be a good clue about how to go about fixing the problem.

After all, spaces do work, just not how you'd expected them to. :-)

Changed in ikarus:
status: Confirmed → Fix Committed
Revision history for this message
Derick Eddington (derick-eddington) wrote :

Why, in the current default library->file-name mapper, does the symbol's \x20; get turned into "%20" instead of a space? Just wondering.

(Also JTMI, I agree with the reasoning about libraries' names corresponding to their functionality; I was goofing around with an editor and its projects folders...)

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote : Re: [Bug 163717] Re: import paths with spaces

On Nov 19, 2007, at 6:38 AM, Derick Eddington wrote:

> Why, in the current default library->file-name mapper, does the
> symbol's
> \x20; get turned into "%20" instead of a space? Just wondering.

I don't have a good reason really. You have to escape some
characters and
space ended up in that set. The current mapper is incomplete anyways
and
there are cases where it does not produce proper file names. But
it's kind
of good enough for now, so it won't be generalized anytime soon.

Revision history for this message
Abdulaziz Ghuloum (aghuloum) wrote :

This bug report is about to be closed as the fix comitted previously
will be incorporated in the next 0.0.2 release of Ikarus Scheme,
scheduled for November 28, 2007.
A release candidate tarball is available for download from:
  http://www.cs.indiana.edu/~aghuloum/ikarus/ikarus-0.0.2-rc1.tar.gz
Please do test it if you have the time and report any issues you
might encounter. Thank you very much for your support. Aziz,,,
(Sorry for the duplicates; I'm updating every open bug.)

Changed in ikarus:
milestone: none → 0.0.2
Changed in ikarus:
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.