On Sun, Sep 1, 2013 at 2:54 AM, Robby Findler <[email protected]>wrote:
> Also, this might help with the dynamic-require approach: > > > http://docs.racket-lang.org/tools/drracket_get_extend.html?q=drracket%3Aget/extend%3Adisallow-re-extension%21#%28def._%28%28lib._drracket%2Ftool-lib..rkt%29._drracket~3aget%2Fextend~3adisallow-re-extension%21%29%29 > Interesting! Looks like it could gain a lot of time. So I tried (but failed) to write a simple tool tester. #lang racket/base (require drracket/tool drracket/private/drsig drracket/tool-lib ; will open a new DrRacket frame at the end! racket/unit) ; The magic line (drracket:get/extend:allow-re-extension!) (define tool (dynamic-require "my-tool.rkt" 'tool@)) (define-values/invoke-unit tool (import drracket:tool^)) where my-tool.rkt contains the example code at the bottom of: http://docs.racket-lang.org/tools/implementing-tools.html But I'm very unsure about the unit stuff (first time with that, the Guide didn't help a lot here) and I the following error: drracket:debug:make-debug-eval-handler: unbound identifier in module in: drracket:debug:make-debug-eval-handler I don't know what to do about them (requiring some other files or adding imports in the invoke-unit did not help). What is weird is that if I remove the unit related stuff in my-tool.rkt, and add: (require drracket/tool-lib) (drracket:get/extend:allow-re-extension!) right before the drracket:get/extend:... lines, it works (opens a new frame with the new tool installed). Robby, it seems that there is not much to do to make it work, right? Laurent
____________________ Racket Users list: http://lists.racket-lang.org/users

