You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "PiotrDuz (via GitHub)" <gi...@apache.org> on 2026/04/15 10:08:46 UTC

[I] Apache Fory regression bug - 0.11.1 version to 0.16.0 : cannot serialise cyclic object graph anymore [fory]

PiotrDuz opened a new issue, #3572:
URL: https://github.com/apache/fory/issues/3572

   ### Search before asking
   
   - [x] I had searched in the [issues](https://github.com/apache/fory/issues) and found no similar issues.
   
   
   ### Version
   
   Hello, 
   We were using apache fory 0.11.1 successfully. After updating to 0.16.0 , we no longer can serialise our complex cyclic object graph. Apache fory was chosen specifically because it had that capability. 
   I am reporting is as a bug because I hope the functionality can be bring back. 
   
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   Reproduction example is here: 
   https://github.com/PiotrDuz/fory-compiler-error-repro
   Just please run a test. 
   It seems that 
   
   ### What did you expect to see?
   
   I want the object to be serialised and deserialised properly. 
   In reproduction example, test should be green.
   
   ### What did you see instead?
   
   The exception in auto-generated code: 
   
   `Caused by: org.apache.fory.shaded.org.codehaus.commons.compiler.CompileException: File 'io/cashforce/ng/platformapi/data/masterdata/mdsnapshot/ReproNodeForyRefCodec_0.java', Line 387, Column 9: Assignment conversion not possible from type "java.lang.Enum" to type "io.cashforce.ng.platformapi.data.masterdata.mdsnapshot.ReproType"
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler.compileError(UnitCompiler.java:13228)
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler.assignmentConversion(UnitCompiler.java:11445)
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler.compile2(UnitCompiler.java:4186)
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler.access$6300(UnitCompiler.java:240)
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler$13.visitAssignment(UnitCompiler.java:4143)
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler$13.visitAssignment(UnitCompiler.java:4126)
   	at org.apache.fory.shaded.org.codehaus.janino.Java$Assignment.accept(Java.java:4864)
   	at org.apache.fory.shaded.org.codehaus.janino.UnitCompiler.compile(UnitCompiler.java:4126)`
   
   ### Anything Else?
   
   I have used AI to generate simple reproducible example, as I could not attach our production code. 
   Please do not be repelled by some AI artefacts.
   The test successfully shows the error we see in our staging environment. 
   Also, here is  AI found root cause (which looks sound, but I am warning that haven't put much thought to review): 
   
   Root cause: The generated serializer (ReproNodeForyRefCodec_0) for a Map<ReproType, Set<ReproNode>> field emits:
     ReproType key = ((Enum) entry.getKey());  // line 387
     But Enum cannot be assigned to ReproType without a cast. It should generate:
     ReproType key = ((ReproType) entry.getKey());
   
   
   
   ### Are you willing to submit a PR?
   
   - [ ] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] Apache Fory regression bug - 0.11.1 version to 0.16.0 : cannot serialise cyclic object graph anymore [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang closed issue #3572: Apache Fory regression bug - 0.11.1 version to 0.16.0 : cannot serialise cyclic object graph anymore
URL: https://github.com/apache/fory/issues/3572


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] Apache Fory regression bug - 0.11.1 version to 0.16.0 : cannot serialise cyclic object graph anymore [fory]

Posted by "chaokunyang (via GitHub)" <gi...@apache.org>.
chaokunyang commented on issue #3572:
URL: https://github.com/apache/fory/issues/3572#issuecomment-4252912720

   0.17.0 will be released in this week, stay tuned.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org


Re: [I] Apache Fory regression bug - 0.11.1 version to 0.16.0 : cannot serialise cyclic object graph anymore [fory]

Posted by "PiotrDuz (via GitHub)" <gi...@apache.org>.
PiotrDuz commented on issue #3572:
URL: https://github.com/apache/fory/issues/3572#issuecomment-4252310490

   Seems that it is fixed on master. 
   Added a PR with my reproduction, might be useful for further regression checks: 
   https://github.com/apache/fory/pull/3573
   
   And the issue was fixed here: 
   https://github.com/apache/fory/pull/3504


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org