import paths with spaces

Bug #163717 reported by Derick Eddington on 2007-11-19
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
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))

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
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

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...)

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.

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  Edit
Everyone can see this information.

Other bug subscribers