<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Sep 1, 2013 at 2:54 AM, Robby Findler <span dir="ltr"><<a href="mailto:robby@eecs.northwestern.edu" target="_blank">robby@eecs.northwestern.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Also, this might help with the dynamic-require approach:<div><br></div><div><a href="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" target="_blank">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</a><span class=""><font color="#888888"><br>
</font></span></div></div></blockquote><div><br></div><div>Interesting! Looks like it could gain a lot of time.<br></div></div>So I tried (but failed) to write a simple tool tester.<br><br>#lang racket/base<br>(require drracket/tool<br>
drracket/private/drsig<br> drracket/tool-lib ; will open a new DrRacket frame at the end!<br> racket/unit)<br><br></div><div class="gmail_extra">; The magic line<br></div><div class="gmail_extra">
(drracket:get/extend:allow-re-extension!)<br><br>(define tool (dynamic-require "my-tool.rkt" 'tool@))<br>(define-values/invoke-unit tool <br> (import drracket:tool^))<br><br>where my-tool.rkt contains the example code at the bottom of:<br>
<a href="http://docs.racket-lang.org/tools/implementing-tools.html">http://docs.racket-lang.org/tools/implementing-tools.html</a><br><br></div><div class="gmail_extra">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:<br>
drracket:debug:make-debug-eval-handler: unbound identifier in module in: drracket:debug:make-debug-eval-handler<br></div><div class="gmail_extra">I don't know what to do about them (requiring some other files or adding imports in the invoke-unit did not help).<br>
<br></div><div class="gmail_extra">What is weird is that if I remove the unit related stuff in my-tool.rkt, and add:<br><br>(require drracket/tool-lib)<br></div><div class="gmail_extra">(drracket:get/extend:allow-re-extension!)<br>
<br></div><div class="gmail_extra">right before the drracket:get/extend:... lines, it works (opens a new frame with the new tool installed).<br><br></div><div class="gmail_extra">Robby, it seems that there is not much to do to make it work, right?<br>
</div><div class="gmail_extra"></div><div class="gmail_extra"><br></div><div class="gmail_extra">Laurent<br></div><div class="gmail_extra"><br><br></div></div>