From: Ken A. <kan...@bb...> - 2002-12-09 23:49:05
|
At 05:35 PM 12/9/2002, Kyle R . Burton wrote: >Not being 100% familiar with the code-base, I'm not sure if this 'fix' is >the right approach. > >I was trying to track down a bug in some of my Java code being called >from Scheme -- the final line in the Backtrace was just >java.lang.NullPointerException (not very informative). After digging in >the JScheme sources a bit, can we just add a > > this.exception.printStackTrace(s); If you do (set! jsint.BacktraceException.printJavaTrace$ #t) You should get backtraces, but i presume you're already doing that. Could you send me the actual bactraceException.java file you are using so i can compare it in EMACS. I haven't learned to use patch sucessfullly yet. Though i think you've identified a problem - one should never println a backtrace. >To the else block in printStackTrace so the Java part of the stack trace >is dumped as well as the scheme part(s)? > >A patch that seems to work is attached. >Also, is src/build/bootstrap the only way (right way) to build the code? >I had to compile BacktraceException.java by hand and then run bootstrap >to re-build the jar file, but that somehow feels wrong. Has the project >considered Ant (http://jakarta.apache.org/ant/) as a build tool? I'm going to let you tickle a hot button. I don't mean to offend you, or anyone who uses ant. I'd like to start an honest discussion. To my mind, ant represents a BIG answer to the problem of make, just as JAVACC, or Lex (is there a Java version?) provide a BIG answer to parsing and lexing. I'm interested in smaller answers that are almost as capable that i can remember enough of that i don't have to go to the documentation. This makes me feel like i have more tools in my pocket, which feels better to me than going out and buying another book and reading for a while before i get the code i need. What fells wrong about bootstrap? We build the .jar file and run unit tests because we expected people to just take the .jar and let JScheme start infesting their Java application. It is also the minimum we do when we check in new software. We could provide more "make targets" which would you like? Ant is a nice tool for building Java applications portably, but it requires knowing XML and reading a lot of documentation. We build JScheme using JScheme because it is portable, and a programming language that can be used for scripting, so it can do things finding what .java you depend on and which need to be recompiled easily. In our LL2 Talk: http://ll2.ai.mit.edu/talks/bbnll2/ we present a simple application building example where we compile all the .java files in about 70 lines of code. This is less than most ant build.xml scripts that i've seen. This doesn't do everything ant can do, but at BBN i use a larger system, maybe 900 lines, that does much of what ant does, including invoking ant tasks if the behavior you want isn't accessible any other way. If you feel like pushing me |