Trace import errors
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.
As of rev 1740, you now get:
> (import (foo)) resolution: main.ikarus. sls" ...)
Unhandled exception
Condition components:
1. &error
2. &who: expander
3. &message: "cannot locate library in library-path"
4. &library-
library: (baaz)
files: ("./baaz/
5. &imported-from: (bar)
6. &imported-from: (foo)
Thanks for the suggestion.