Skip to content

Fails to generate files #719

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

Closed
timosturm opened this issue Sep 16, 2020 · 5 comments
Closed

Fails to generate files #719

timosturm opened this issue Sep 16, 2020 · 5 comments

Comments

@timosturm
Copy link

timosturm commented Sep 16, 2020

Generating files fails when running the build command.

flutter --version:

Flutter 1.20.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision fba99f6cf9 (34 hours ago) • 2020-09-14 15:32:52 -0700
Engine • revision d1bc06f032
Tools • Dart 2.9.2

Dependencies:

dependencies:
  ...
  json_annotation: ^3.0.1

dev_dependencies:
  ...
  build_runner: any
  json_serializable: ^3.4.0

Output of flutter pub run build_runner build:

$ flutter pub run build_runner build
Precompiling executable...
Precompiled build_runner:build_runner.
[INFO] Generating build script...
[INFO] Generating build script completed, took 283ms

[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 10.7s

[INFO] Initializing inputs
[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 582ms

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Checking for unexpected pre-existing outputs. completed, took 1ms

[INFO] Running build...
[INFO] Generating SDK summary...
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:
  # dependencies to serialize objects to json
Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] json_serializable:json_serializable on test/utils/parsing_utils.test.dart:

Bad state: Unexpected diagnostics:
/home/timo/development/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[INFO] 1.5s elapsed, 1/17 actions completed.
[INFO] 2.6s elapsed, 1/17 actions completed.
[INFO] 3.7s elapsed, 1/17 actions completed.
[INFO] 4.8s elapsed, 1/17 actions completed.
[INFO] 5.9s elapsed, 1/17 actions completed.
[INFO] 7.0s elapsed, 1/17 actions completed.
[INFO] 8.1s elapsed, 1/17 actions completed.
[INFO] 9.2s elapsed, 1/17 actions completed.
[INFO] 10.3s elapsed, 1/17 actions completed.
[INFO] 11.4s elapsed, 1/17 actions completed.
[INFO] 12.5s elapsed, 1/17 actions completed.
[INFO] 13.6s elapsed, 1/17 actions completed.
[INFO] 14.7s elapsed, 1/17 actions completed.
[WARNING] No actions completed for 15.1s, waiting on:
  - json_serializable:json_serializable on test/utils/utils_test.dart
  - json_serializable:json_serializable on test/utils/crypto_utils_test.dart
  - json_serializable:json_serializable on test/model/token_test.dart
  - json_serializable:json_serializable on lib/l10n/messages_de.dart
  - json_serializable:json_serializable on lib/l10n/messages_en.dart
  .. and 11 more

This message will then be repeated infinitely.
I do not understand why the process is waiting for some test files?

@hashemlou
Copy link

hi
i guess this bug related to incompatible library version in flutter version

@soile1991
Copy link

soile1991 commented Sep 17, 2020

I had the same problem and it worked as expected when I used build_runner: ^1.10.1

dependencies:
  ...
  json_annotation: ^3.0.1

dev_dependencies:
  ...
  build_runner: ^1.10.1
  json_serializable: ^3.4.1

@timosturm
Copy link
Author

I had the same problem and it worked as expected when I used build_runner: ^1.10.1

dependencies:
  ...
  json_annotation: ^3.0.1

dev_dependencies:
  ...
  build_runner: ^1.10.1
  json_serializable: ^3.4.1

It seems to be a problem with build_runner version 1.10.0, using 1.10.1 fixes the problem.

@ininmm
Copy link

ininmm commented Sep 29, 2020

I think this issue is related to the dart sdk.

see: dart-lang/build#2763

@kevmoo
Copy link
Collaborator

kevmoo commented Sep 29, 2020

Yup @ininmm – closing as a duplicate.

@kevmoo kevmoo closed this as completed Sep 29, 2020
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

5 participants