isar / isar/hive

Dependency conflict: hive_generator ^2.0.1 incompatible with json_serializable ^6.9.2

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

Description

There is a dependency conflict when using hive_generator version ^2.0.1 alongside json_serializable version ^6.9.2 due to differing source_gen version requirements:

Because hive_generator 2.0.1 depends on source_gen ^1.0.0 and json_serializable 6.9.2 depends on source_gen ^2.0.0, json_serializable ^6.9.2 is incompatible with hive_generator ^2.0.1.
So, because smart_by_jarod depends on both hive_generator ^2.0.1 and json_serializable ^6.9.2, version solving failed.

Environment:
• Flutter version: 3.27.1 (stable)
• Dart version: 3.6.0
• OS: macOS 15.2 (darwin-arm64)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the pub version-solving failure in a minimal Dart/Flutter setup using hive_generator ^2.0.1 and json_serializable ^6.9.2; inspect the packages' source_gen constraints first. Done means the two dependencies resolve together under the reported Dart and Flutter versions, with code generation still working.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.