Closed muvaf closed 2 years ago
We had a couple of offline discussions about some restructuring around how we are taking custom configuration from users. @ulucinar also mentioned today, the experience would be much better if we put custom configuration into a separate directory like custom/rds/custom.go
instead of apis/rds/custom.go
which would then allow us to clean up simply by deleting apis
and internal
directories before generating schema and controllers.
I wanted to mention this here since it could be fixed by importing a non-generating directory as a side effect.
What happened?
When I delete all generated files from
apis
folder, the following side-effect import throws error:I think we should have a non-generated Go file in
apis
folder that contains aconfig.Provider
object that will be populated by theinit()
calls ofcustom.go
files in CRD packages instead of targeting theProvider
instance in Terrajet package.How can we reproduce it?
find apis -iname 'zz_*' | xargs rm -rf && find internal -iname 'zz_*' | xargs rm -rf
go run cmd/generator/main.go