crossplane / terrajet

Generate Crossplane Providers from any Terraform Provider
https://crossplane.io
Apache License 2.0
289 stars 38 forks source link

Make the generated file more explicit about their usage. (use a `.gen.go` extension) #220

Open remyleone opened 2 years ago

remyleone commented 2 years ago

What problem are you facing?

Having all files generated prefixed by zz_generated does not make it easier to understand what they are about when opened in a tree explorer.

How could Terrajet help solve your problem?

terrajet could generate files like .gen.go this convention is already followed by protobuf generator in go to make the distinction between generated files and hand written files.

muvaf commented 2 years ago

Hi @remyleone ! We're mostly following the convention of kubebuilder from upstream which uses that prefix for its generated files so that all generated files look similar 🙂

remyleone commented 2 years ago

One thing that was not clear is whether or not those files should be kept as it or should they be renamed/edited. What happen if I need to update the jet-generated files? Maybe it would be helpful to add in the header of those generated files if they should be deleted/edited/renamed. In particular it could be really helpful to have a small description/documentation at the top of the files that explain what they mean. I'm not sure to understand what are the differences between deepcopy, managed, managedlist, terraform, and types.

muvaf commented 2 years ago

Oh does that notice not appear in your generated files?

// Code generated by terrajet. DO NOT EDIT.

remyleone commented 2 years ago

It does appear but I don't understand what this generated code does or the purpose it got. A bit of documentation about why those files are needed and how they work together and interact with the rest of the provider could be useful.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.