hyln9 / ikarus

Optimizing incremental native-code compiler for R6RS scheme. This is a forked repository.
https://launchpad.net/ikarus
Other
5 stars 0 forks source link

Trace import errors #192

Closed hyln9 closed 10 years ago

hyln9 commented 10 years ago

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

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.

Launchpad Details: #LP311696 Michael D. Adams - 2008-12-27 03:40:41 -0500

hyln9 commented 10 years ago

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.

Launchpad Details: #LPC Abdulaziz Ghuloum - 2009-01-03 20:25:27 -0500