From: Jason D. <ja...@pl...> - 2001-12-22 07:42:38
|
Well, after a little more investigation I was able to get the compile error to reoccur when I was not using a package name. command/executor needed support, since it defines a psuedo abstract class which performs the magic to call the superclass constructor or not, plus adding the ability to call getName() by masking it to a call to name(). Don't really know what is up with that, but I could not find any way to call a getName() method on a super class... seems to want to turn it into a call to Class or something. Anyways. I played with the generated source for command/executor.java, added an 'import support;' and then it would compile fine with out a package name. But when it it comes time to import the namespace from support, it freaks out about missing names. Which certainly exist, as when I copy the exact file to command/ it works. Anyways, the working 'support' name is registered as a PyModule, where as the broken 'support' name is a PyJavaClass... which is probably because I added the explicit import... but I don't really know if that is true. After littering the current code base with System.out's it looks like it can't find its parent module (pytest.command), so that is probably why it doesn't try to search up for the support module. So why doesn't the jythonc'd version pay attention to the command/__init__.py ? I tried compliing command and command.executor, but I get a NPE which I don't even know where to start looking for the problem there. So then I tried added a toplevel main.py, which explicitly imported all of the nested modules and packages. Could not from XXX import * either, or modules listed in the package __all__ would not get loaded. Still can't find parent module... Well, I think I am going to put this away for a while. I hope that I am just missing something, as it would be really nice to get this functional. I suppose I could look into driving the execution from Jython, but then I have more work ahead of me to rebuild the functionality of the Ant tasks. Perhaps that is best anyways, since there are minor compatibility issues when jythonc is tossed in the mix. =( --jason |