Trace import errors

Bug #311696 reported by Michael D. Adams
2
Affects Status Importance Assigned to Milestone
Ikarus Scheme
Fix Committed
Low
Abdulaziz Ghuloum

Bug Description

Currently the error printed if a library can't be found only lists the missing library, but if that library is being indirectly imported this may make tracking down the location of the offending import difficult. It would be nice if some sort of trace of the imports that triggered the missing library was recorded or if name of the library (or script) that is attempting to import the missing library could be printed.

For example:
 in baz.scm (library (baz) (export) (import))
 in bar.scm (library (bar) (export) (import (baaz)))
 in foo.scm (library (foo) (export) (import (bar) <lots of other libraries> ...))

If at the REPL you do (import (foo)), you'll get an error about not finding baaz, but without anything indicating that is was "bar" and not one of the other libraries imported by "foo" that is at fault.

Related branches

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

As of rev 1740, you now get:

> (import (foo))
Unhandled exception
 Condition components:
   1. &error
   2. &who: expander
   3. &message: "cannot locate library in library-path"
   4. &library-resolution:
       library: (baaz)
       files: ("./baaz/main.ikarus.sls" ...)
   5. &imported-from: (bar)
   6. &imported-from: (foo)

Thanks for the suggestion.

Changed in ikarus:
assignee: nobody → aghuloum
importance: Undecided → Low
milestone: none → 0.0.4
status: New → Fix Committed
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.