Redefinition/re-loading [was: kawa paid support]
mikel evins
mevins@me.com
Sun Apr 5 23:32:00 GMT 2015
> On Apr 5, 2015, at 5:58 PM, mikel evins <mevins@me.com> wrote:
>
> As I say, I'm doing a refactor right now in order to simplify one of the subsystems, so it's an especially good moment to suggest things I might try. The first thing I'll try to do is just skip the kill-and-restart step and see if I can gather some info for you about what stacktraces I end up seeing.
First example. Here's the context:
I started with a subset of my sources, 8 source files, loaded in the way I described before, with a single require in the main file, and transitive loads handled by requires in the subsidiary files. Those eight files loaded with out error and ran the app code as expected.
Next I add a new file which defines a new class, a subclass of a JME class. On first load, I find that I neglected to define private aliases for two Java types that the source file uses. So I add the missing private aliases and reload. The reload results in the stack trace below. Killing and restarting kawa enables me to load the code without error, and the client app runs without incident.
#|kawa:3|# Exception in thread "main" java.lang.Error: internal error: cannot take location of Declaration[FabricClient/1013]
at gnu.expr.Declaration.load(Declaration.java:300)
at gnu.expr.ReferenceExp.compile(ReferenceExp.java:175)
at gnu.expr.Expression.compileWithPosition(Expression.java:132)
at gnu.expr.BindingInitializer.emit(BindingInitializer.java:109)
at gnu.expr.Compilation.dumpInitializers(Compilation.java:716)
at gnu.expr.Compilation.generateBytecode(Compilation.java:2169)
at gnu.expr.Compilation.process(Compilation.java:2001)
at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:290)
at gnu.expr.ModuleExp.evalToClass(ModuleExp.java:69)
at gnu.expr.ModuleExp.evalModule1(ModuleExp.java:259)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:214)
at kawa.Shell.run(Shell.java:291)
at kawa.Shell.runFile(Shell.java:523)
at kawa.standard.load.apply2(load.java:67)
at kawa.standard.load.apply1(load.java:27)
at gnu.mapping.Procedure.apply(Procedure.java:135)
at gnu.mapping.Procedure.apply(Procedure.java:118)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:381)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:219)
at kawa.Shell.run(Shell.java:291)
at kawa.Shell.run(Shell.java:203)
at kawa.Shell.run(Shell.java:184)
at kawa.repl.main(repl.java:892)
Process scheme exited abnormally with code 1
More information about the Kawa
mailing list