8000 An unexpected error was thrown trying to get location information on `String id` (FieldElementImpl). · Issue #759 · dart-lang/source_gen · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

An unexpected error was thrown trying to get location information on String id (FieldElementImpl). #759

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Rexios80 opened this issue May 9, 2025 · 0 comments

Comments

@Rexios80
Copy link
Rexios80 commented May 9, 2025

source_gen: 2.0.0
analyzer: 7.3.0

Deleting .dart_tool fixes this for a while, but it keeps coming back

[INFO] Generating build script...
[INFO] Generating build script completed, took 172ms

[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 81ms

[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 1.2s

[INFO] Running build...
[INFO] 1.2s elapsed, 34/36 actions completed.
[WARNING] hive_ce_generator:hive_adapters_generator on lib/src/hive/hive_adapters.dart:
An unexpected error was thrown trying to get location information on `String id` (FieldElementImpl).

Please file an issue at https://github.com/dart-lang/source_gen/issues/new
Include the contents of this warning and the stack trace along with
the version of `package:source_gen`, `package:analyzer` from `pubspec.lock`.

RangeError: Index: 0, Size: 0
package:analyzer/src/dart/ast/ast.dart 12897:7                              NodeListImpl.[]
package:source_gen/src/type_checker.dart 334:34                             UnresolvedAnnotationException._findSpan
package:source_gen/src/type_checker.dart 366:24                             new UnresolvedAnnotationException._from
package:source_gen/src/type_checker.dart 114:43                             TypeChecker._computeConstantValue
package:source_gen/src/type_checker.dart 139:21                             TypeChecker._annotationsWhere
dart:core                                                                   Iterable.isEmpty
package:source_gen/src/type_checker.dart 95:20                              TypeChecker.firstAnnotationOfExact
package:hive_ce_generator/src/helper/helper.dart 33:33                      getHiveFieldAnn
package:hive_ce_generator/src/generator/type_adapter_generator.dart 155:11  TypeAdapterGenerator.getAccessors.accessorToField
package:hive_ce_generator/src/generator/type_adapter_generator.dart 191:27  TypeAdapterGenerator.getAccessors
package:hive_ce_generator/src/generator/type_adapter_generator.dart 42:32   TypeAdapterGenerator.generateTypeAdapter
package:hive_ce_generator/src/generator/adapters_generator.dart 68:43       AdaptersGenerator.generateForAnnotatedElement
package:source_gen/src/output_helpers.dart 10:1                             normalizeGeneratorOutput
package:async/src/stream_completer.dart 76:3                                StreamCompleter.setSourceStream

[SEVERE] hive_ce_generator:hive_adapters_generator on lib/src/hive/hive_adapters.dart:

Could not resolve annotation for `String id`.
[INFO] Running build completed, took 2.2s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 64ms

[SEVERE] Failed after 2.3s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0