[plt-scheme] setup-plt --mode errortrace standard-module-name-resolver: cycle in loading

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Aug 1 10:45:12 EDT 2008

At Fri, 01 Aug 2008 10:17:02 -0400, Neil Van Dyke wrote:
> Thanks, Matthew.  That will be great once you get a chance to work on it.
> 
> In the interim, is there anything I can do to improve the backtraces 
> when debugging, short of deleting all ".zo"s and running with "-l 
> errortrace" (which means glacial performance, due to the way we're 
> running right now)?

Here's a strategy that may help:

 1. Change "errortrace-key.ss" to

    (module errortrace-key '#%kernel
      (define-values (errortrace-key) (gensym 'key))
  
      (#%provide errortrace-key))

    The key here is using the built-in '#%kernel module insteda of
    `scheme' modules.

 2. Run `setup-plt --mode errortrace ....'. It's not getting the
    dependencies right, for reasons that I'm not yet sure about, but if
    you interrupt and re-start several times, it might work well
    enough.

 3. Create a new "et.ss" module:

    (module et '#%kernel
      (use-compiled-file-paths 
       (cons (build-path "compiled" "errortrace")
             (use-compiled-file-paths))))

    Require that module before `-l errortrace' when starting.

    The problem with just using `-l errortrace' is that is loads parts
    of `scheme', and so there will be a mismatch when you load in
    further modules that have been compiled against the the
    errortrace-instrumented `scheme' modules.


Matthew



Posted on the users mailing list.