This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: the right way to compile and load modules
- From: mikel evins <mevins at me dot com>
- To: Charles Turner <chturne at gmail dot com>
- Cc: mikel evins <mevins at me dot com>, Kawa mailing list <kawa at sourceware dot org>
- Date: Tue, 13 May 2014 02:45:03 -0500
- Subject: Re: the right way to compile and load modules
- Authentication-results: sourceware.org; auth=none
- References: <9F312D97-98C6-4F47-BDD9-B6CAF3868A28 at me dot com> <CAPMhJv3mgSgwP_OxUbVR85pH7crgyunz2q-b2i2-iC2wA+=agQ at mail dot gmail dot com>
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.