google / google/built_value.dart

@SerializersFor doesn't show error if there's a missing part file

Open
#788 1 comment 0 reactions 1 assignee Claimed by @davidmorgan View on GitHub
p2 / feature request
Dominant language
Dart
Stars
886
Forks
195
Avg merge
1d 11h
Merged PRs (30d)
4

Description

I copied the `@SerializersFor` code from the example as:

```dart
@SerializersFor([
MyType,
])
final Serializers serializers = _$serializers;
```

And IntelliJ IDEA said `_$serializers` couldn't be found, but the `built_value` watch command runned just fine, never indicating any errors, but still my code wasn't compiling. After a while I realized I should add a `part 'main.g.dart';` line, and then everything compiled fine.

`watch` and `build` should have an error message saying there should be a `part` file indication.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.