Skip to content

Commit

Permalink
Merge pull request #66 from IO-Design-Team/feature/dependency-upgrade…
Browse files Browse the repository at this point in the history
…s-2025-1-9

Support analyzer 7
  • Loading branch information
Rexios80 authored Jan 9, 2025
2 parents 8e0b7e3 + 6d1327f commit ad0001e
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
6 changes: 4 additions & 2 deletions benchmarks/storage/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ dependencies:
csv: ^6.0.0

dev_dependencies:
rexios_lints: ^8.2.0
build_runner: ^2.4.13
rexios_lints: ^9.2.0
# build_runner: ^2.4.13 # TODO: Fix this
json_serializable: ^6.8.0
hive_ce_generator: any

Expand All @@ -22,3 +22,5 @@ dependency_overrides:
path: ../../hive
hive_ce_generator:
path: ../../hive_generator
source_gen: ^2.0.0
analyzer: ^7.0.0
4 changes: 4 additions & 0 deletions hive_generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.8.2

- Supports analyzer 7

## 1.8.1

- Fixes a bug in the migrator affecting `freezed` classes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ class ClassAdapterBuilder extends AdapterBuilder {
String buildWrite() {
final code = StringBuffer();
code.writeln('writer');
code.writeln('..writeByte(${getters.length})');
// Only cascade when there are getters
if (getters.isNotEmpty) code.write('.');
code.writeln('.writeByte(${getters.length})');
for (final field in getters) {
code.writeln('''
..writeByte(${field.index})
Expand Down Expand Up @@ -218,9 +220,7 @@ extension on DartType {
final definingLibrary = element.library;
if (definingLibrary == currentLibrary) return getDisplayString();

// TODO: This is failing in beta (remove when fixed)
// ignore: deprecated_member_use
for (final import in currentLibrary.libraryImports) {
for (final import in currentLibrary.units.expand((e) => e.libraryImports)) {
for (final MapEntry(:key, :value)
in import.namespace.definedNames.entries) {
if (value == element) {
Expand Down
6 changes: 3 additions & 3 deletions hive_generator/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hive_ce_generator
description: Extension for Hive. Automatically generates TypeAdapters to store any class.
version: 1.8.1
version: 1.8.2
homepage: https://github.com/IO-Design-Team/hive_ce/tree/main/hive_generator
documentation: https://docs.hivedb.dev/

Expand All @@ -9,9 +9,9 @@ environment:

dependencies:
build: ^2.0.0
source_gen: ^1.0.0
source_gen: ^2.0.0
hive_ce: ^2.8.0
analyzer: ^6.5.0
analyzer: ^7.1.0
source_helper: ^1.1.0
glob: ^2.1.2
path: ^1.9.0
Expand Down

0 comments on commit ad0001e

Please sign in to comment.