source_gen
                                
                                 source_gen copied to clipboard
                                
                                    source_gen copied to clipboard
                            
                            
                            
                        Automatic source code generation for Dart
```dart const predefinedAnnotation = SomeAnnotation('this is predefined'); @predefinedAnnotation // this is the first case @SomeAnnotation('this is defined as it's needed') // this is the second case class SomeClass { }...
https://github.com/dart-lang/source_gen/blob/master/source_gen/lib/src/builder.dart If `partId` provided to the SharedPartBuilder doesn't meet regex validation, an error is thrown: ```dart if (!_partIdRegExp.hasMatch(partId)) { throw ArgumentError.value( partId, 'partId', '`partId` can only contain letters, numbers, `_`...
I would expect `TypeChecker.isAssignableFromType(staticType)` to take the nullability of the types into account. It returns `true` incorrectly if the TypeChecker type is not nullable but `staticType` is nullable. Dart SDK...
The build systems run on the Dart VM only, so there are limitations on what imports can be used by builders. Add documentation describing how to work around this limitation...
I have a property like: ``` Map animations = {}; ``` Before I can read its type when running analyzer with this code: ``` class MyGenerator extends Generator { @override...
For instance trying to revive from ```dart @Foo.foo class Foo { static const foo = Deprecated('argument'); } ``` When we search for potential fields which define this argument, we only...
The buildExtensions in `builder.dart` is `.dart` It builds for any dart file ` buildExtensions = { '.dart': [generatedExtension]..addAll(additionalOutputExtensions) },` So even if in build.yaml, I set the build input to...
Following the internal discussion. We're not blocked, but I think there was some interest in removing it anyway.
I am generating code from a function ``` @mycodegen List getCats() { return cats; } ``` I need now to get an import statement when I reproduce the call method...