2 ms·
The autogenerated class with no source code was not a hypothetical example. This was something I saw cause a problem in production, where the source code in th
by jimbokun 3y ago
The autogenerated class with no source code was not a hypothetical example. This was something I saw cause a problem in production, where the source code in the stack trace didn't exist.
- eximius 3y agocode generation is a mostly disjoint topic from DI. Granted, some solutions like https://github.com/google/wire https://github.com/google/wire use code generation, but you're exactly right about their pitfalls. If your dev environment doesn't have good support for generated code, it is a nightmare. If you can goto-definition the generated code, then it is suddenly feasible, but perhaps still a bad choice. But the DI frameworks I've used are typically just... normal code files. Uber/fx, Go/Guice, etc