This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Problems with duplicate declarations of modules
- From: alex mitchell <alexm at nus dot edu dot sg>
- To: Per Bothner <per at bothner dot com>
- Cc: "kawa at sources dot redhat dot com" <kawa at sources dot redhat dot com>
- Date: Thu, 06 Aug 2009 14:09:43 +0800
- Subject: Re: Problems with duplicate declarations of modules
Thanks, I'll give that a try, see if I can narrow down where the problem is
coming from.
Alex
On 8/5/09 11:52 PM, "Per Bothner" wrote:
> On 08/04/2009 11:48 PM, alex mitchell wrote:
>> On 6/25/09 8:08 AM, "Per Bothner" wrote:
>>> If you have Unix commands available, I'd try:
>>>
>>> rm -f `find . -name '*.class'` `find . -name '*.jar'`
>>>
>>> That doesn't do it?
>> Note that I'm running inside Eclipse, which is essentially the same as
>> running from the Kawa interpreter, rather than compiling. In this case,
>> where would I do the rm? Is there a temp folder somewhere that the .class
>> files are being cached when the interpreter is run? I don't see any files in
>> my working directories.
>
> I don't normally use Eclipse. To debug this it would be easier to
> run things stand-alone, from the command line, but it should be possible
> to do some from Eclipse.
>
> Actual class files are not created in interpretive mode. In that case
> it does compile to classes, but they are loaded immediately after being
> compiled, without being written to disk. However, these classes are
> managed by a "module manager" (see gnu.expr.ModuleManager and
> ModuleInfo), and it is possible there is some confusion in that
> part of the code.
>
> What you might want to try is put either a println or a breakpoint
> in those places where a ModuleInfo is created. If you see a duplicate
> - i.e. two ModuleInfo instances created for the same module, then we
> need to find out why. Notice sometimes we look for modules based
> on source file names and sometimes based on class names, and it is
> possible that might be why we're failing to notice a duplicate.
>
> I'm also assuming you're not using (load ...) - load does not interact
> well with modules, because load is a function, not syntax.