source_gen icon indicating copy to clipboard operation
source_gen copied to clipboard

Automatic source code generation for Dart

Results 39 source_gen issues
Sort by recently updated
recently updated
newest added

e.g. Adding a test to constants_test.dart: ```dart @TypeWrapper(String) class Example {} class TypeWrapper { final Type t; const TypeWrapper(this.t); } test('should not crash when resolving types', () { expect(typeWrapperConstant.read('t').revive(), isNull...

type-bug

Hi, is it possible to add an option to combining_builder which leads to the line `//coverage:ignore-file` beeing added on top of generated files. Or is there already an existing solution?...

The implementation null asserts `DartType.element2`: https://github.com/dart-lang/source_gen/blob/0d4c54d2a299643ba2a783ef2e9fcf878305a62d/source_gen/lib/src/type_checker.dart#L170-L171 Which is always null for Function types: https://github.com/dart-lang/sdk/blob/d6ff1193c5eb1d4b98e232f545cce49c63492b5c/pkg/analyzer/lib/src/dart/element/type.dart#L95-L96

Using PartBuilder i am not able to generate the files in specific folder. pubspec.yaml ``` dependencies: material: 1.0.0+2 meta: 1.10.0 source_gen: ^1.4.0 ``` I have tried below in my project...

It would be nicer as a builder library to allow for users to extend our classes and allow them to leverage our builder while not adding the user's custom logic...

## Motive I work on a [project](https://github.com/gibahjoe/openapi-generator-dart) to provide a dart annotation that allows us to run the OpenAPI generator from a Dart defined config. I was looking to provide...

Hello! I was wondering if it was possible to extract various analyzer-based utils. They aren't tied to `build`, but are useful for quite a lot of analyzer projects. For example,...

It is statically breaking to move the runtime null check to a static null check, but it's worth doing because a static check is preferred over a runtime check.

next-breaking-release

Trying to check if a mixin element type represents a super type I found the following statement documented on `isSuperTypeOf()`: > Returns true if representing a super type of staticType....

**Dart SDK version:** 3.0.4 (stable) (Wed Jun 7 14:55:32 2023 +0000) on "windows_x64" I'm using a custom builder to generate JSON from some annotations used in another program. You can...