DEV Community

Edward Tam
Edward Tam

Posted on

Golang: generated code + version control

I realized that Golang communities seem to have a very different opinion on this topic than other languages.

I understand that there are pros and cons on checking in generated code to the repositories. In golang specifically, that will make repos more go-gettable. However, I did see how generated code being version controlled can cause confusion and lead to problematic situations.

I am genuinely curious about your thoughts:

Would you check in source code generated by a generator into the repositories and why?

Top comments (3)

Collapse
 
polterguy profile image
Thomas Hansen

The larger and more important question is; "Would you want to use GoLang for 'real' software". Bear with me though before judging me ...

The challenge with GoLang is that its eco system is too immature, and finding (great quality) libraries is extremely difficult, even though the language itself is amazing, and maintained by Google. We started out a project ourselves using GoLang, and had to scrap the entire thing after 4 months of development, due to realising there are simply not enough supporting libraries for it, to support the toolchain we needed to solve our problems.

Of course, if you don't need anything besides simple HTTP REST, it's amazing. Once you start having to integrate the thing with Pulsar, SMTP, ScyllaDB, "whatever" really - Its immatureness really starts bothering you ... :/

GoLang is an amazing language, but its inability to solve problems due to its lack of libraries and tools, becomes painful once above some threshold in complexity unfortunately ... :/

Collapse
 
etampro profile image
Edward Tam

I do realize that communities in golang tend to stick tight to the native packages. I am curious about your problems and what type of libraries lacking that drove your team away from it.

Simplicity is good, but i guess it can also be a double edge sword sometimes ...

Collapse
 
polterguy profile image
Thomas Hansen

For us specifically the pain point was Pulsar libraries ... :/