source_gen
source_gen copied to clipboard
Drop InvalidGenerationSourceError
This class does not follow best practices, and I think it's outlived it's usefulness. We'd also like to shift the concept of a build failure into the core build system instead of source_gen
. The concept of writing "error" output to the generated file is also outdated. I don't think any of our build systems treat the file as having any useful content if it is a failure.
https://github.com/dart-lang/build/issues/981
cc @davidmorgan - this class is used in built_value_generator
. I think most of that error handling can be remove entirely. It should be fine to let the exception bubble up.
cc @jakemac53 @leonsenft
Thanks, filed an issue for built_value. Any timeline for this? I guess built_value will need updating before we can roll the updated source_gen to google3.
We'll hopefully have a migration plan or at least a design for a replacement before dropping it here so no rush for now.
FYI a3e3c9af7c8937b096d1c618e0ed50f71be9de63 does away w/ the idea of including error messages in source code
I think we turned out to expand usage of InvalidGenerationSource
, and it does seem to be useful enough to keep.