This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: the right way to compile and load modules


On May 13, 2014, at 2:29 AM, Charles Turner <chturne@gmail.com> wrote:

> Hi Mikel,
> 
> Can you post your test code so that the people on this list can see
> what you're trying to do?

Your code is not significantly different from what I would provide. In fact, it closely resembles my own test case.

I don't mind supplying a boiled-down test case, but I doubt it will shed any new light.

> At this point, the BAR procedure from bar.scm is publicly visible
> (exported) as you correctly said. I'm guessing your first runtime
> error is because you're not
> requiring (using REQUIRE) or loading (using LOAD) the bar.scm file from foo.scm.

No; I see the same error if I require the file unless the required file contains a module-export form.

> I now compile these files like so,
> prompt> java kawa.repl -C bar.scm
> prompt> java jawa.repl --main -C foo.scm
> 
> I'm guessing that you're second observation about Kawa "complains that
> bar is exported but never defined" is because you're compiling bar.scm
> with the --main switch.

No; I see the warnings when loading interactively into the repl, not when compiling. 

I'd like to reach a state where I can work interactively without seeing gobs of warnings, and where I can also compile the same sources to an executable jar.

I'm partway there; I can in fact build an executable jar. I can also load the code into an interactive session; I just can't do so without kawa spewing warnings at me.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]