Changes between Version 142 and Version 143 of j2p


Ignore:
Timestamp:
10/10/24 12:11:59 (3 weeks ago)
Author:
wouter
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • j2p

    v142 v143  
    398398||I get something like {{{from com.X.Y.Z import Z: ModuleNotFoundError: No module named 'com'}}}. {{{com.X.Y.Z}}} is a java package that does not exist in python. ||You did not provide  a library or code translate {{{com.X.Y.Z}}} and the translator now uses a "stub" translator that assumes the package on the python side is identical. To fix, you have to add a translator for the {{{com.X.Y.Z}}} package. Or avoid using the package in java||
    399399||I get POSTFIX_INCREMENT: not supported and the same for POSTFIX_DECREMENT.  Why is this not supported?||The general prefix- and postfix-increments are tricky, because they postpone the actual change of the variable. In python multiple statements would have to be used. However this can also occur in situations where python does not allow such multiple statements. We recommend to manually unroll and use extra statements +=1 and -=1 before or after the statement. The general case may require more advanced refactoring.||
    400 ||Everything compiles fine but I get {{{ImportError: cannot import name ... from partially initialized module}}} when running in python ||Typically this happened if your java code has a cyclic reference: class A refers to B and class B refers to A. Python can not handle such cyclic references. We suggest using the @Defer annotation to help the translator, or to refactor the code.||
     400||Everything compiles fine but I get {{{ImportError: cannot import name ... from partially initialized module}}} when running in python ||Typically this happened if your java code has a cyclic reference: class A refers to B and class B refers to A. Python can not handle such cyclic references. We suggest using the {{{@Defer}}} annotation to help the translator, or to refactor the code.||