isar / isar/hive

hive_generator should complain about final fields

Open
#1,000 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

Just finished debugging to discover that a field was missing in the generated typeAdapter, because it was of type `final List`. hive_generator failed silently on this, generating code that wrote the field but didn't read it.

Even a simple warning could help here. All I needed to do to fix this was remove `final`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the hive_generator entry point that handles final fields and inspect the generated typeAdapter path for a final List. Reproduce the case and verify that generation no longer silently omits the read behavior, instead reporting the unsupported field clearly.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
database, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.