Skip to content

feat: [Compiler] format generated code by header and line break #3233#3244

Open
lavisha4193 wants to merge 7 commits into
apache:mainfrom
lavisha4193:main
Open

feat: [Compiler] format generated code by header and line break #3233#3244
lavisha4193 wants to merge 7 commits into
apache:mainfrom
lavisha4193:main

Conversation

@lavisha4193

Copy link
Copy Markdown

Why?

[Compiler] format generated code by header and line break

What does this PR do?

[Compiler] format generated code by header and line break

Related issues

Is there any related issue? If this PR closes them you say say fix/closes:

@lavisha4193 lavisha4193 changed the title [Compiler] format generated code by header and line break #3233 Jan 29, 2026
…tructs

- Add wrap_line/wrap_lines methods to BaseGenerator for smart line breaking
- Override wrap_line in Go generator to preserve function signatures and struct tags
- Override wrap_line in Python generator to preserve assignments and conditionals
- Modify Java generator to use string concatenation for long error messages
- Fix ruff formatting issues (multi-line if statements, trailing whitespace)

This fixes syntax errors in generated IDL code across Java, Go, and Python.
Comment thread compiler/fory_compiler/generators/python.py
Comment thread compiler/fory_compiler/generators/go.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants