Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: hope add format for generated *_pb.jl #206

Closed
zsz00 opened this issue Aug 18, 2022 · 6 comments
Closed

feature: hope add format for generated *_pb.jl #206

zsz00 opened this issue Aug 18, 2022 · 6 comments

Comments

@zsz00
Copy link
Contributor

zsz00 commented Aug 18, 2022

hope add format for generated *_pb.jl

image

@Drvi
Copy link
Member

Drvi commented Aug 18, 2022

I tried making the generated metadata methods having one field per line, but the files got really long because of that. I think if one wants to read the metadata, they should look at the proto files directly, and use these generated methods only when the need to programmatically access their values.

As a workaround, you can install JuliaFormatter and format the whole output directory of translated julia files.

@zsz00
Copy link
Contributor Author

zsz00 commented Aug 18, 2022

I update the picture :
image
export ..... too long

ok, I can format the whole output directory *.jl use JuliaFormatter.

@Drvi
Copy link
Member

Drvi commented Aug 18, 2022

Yeah, for exports it kinda makes sense to have them presented in a readable way... Want to contribute?:) These lines print the export statement: https://github.com/JuliaIO/ProtoBuf.jl/blob/v1.0.2/src/codegen/toplevel_definitions.jl#L180-L185

I think I a case like this we want multiple lines starting with exportkeyword and all of them shorter than 92 characters, a la second example in the Blue Style

@zsz00
Copy link
Contributor Author

zsz00 commented Aug 18, 2022

OK, Let me try do this

@zsz00
Copy link
Contributor Author

zsz00 commented Aug 18, 2022

#207

@Drvi
Copy link
Member

Drvi commented Aug 20, 2022

Closed via #207 and #210

@Drvi Drvi closed this as completed Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants