Fidev-io / framy

A convenient code generator for app styleguide, gallery, wireframes and/or storyboard.
https://framy.dev
GNU Lesser General Public License v3.0
148 stars 16 forks source link

Bad state: Unexpected diagnostics #155

Open Rockncoder opened 4 years ago

Rockncoder commented 4 years ago

I tried to add framy to the Flutter demo counter app. After executing the command: flutter pub run build_runner build I received the error:

[INFO] Running build...
[WARNING] framy_generator:model_builder on lib/main.dart:
inside this build
[WARNING] framy_generator:model_builder on test/widget_test.dart:
inside this build
[INFO] Generating SDK summary...
[SEVERE] framy_generator:model_builder on lib/main.dart:

Bad state: Unexpected diagnostics:
/Users/troymiles/developer/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] framy_generator:model_builder on lib/main.dart:

I didn't add any code to the flutter counter app besides the @FramyApp().

Here is the important part of main.dart:

import 'package:flutter/material.dart';
import 'package:framy_annotation/framy_annotation.dart';

void main() {
  runApp(MyApp());
}

@FramyApp()
class MyApp extends StatelessWidget {
  // This widget is the root of your application.

Here is my pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
  framy_annotation:

  # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.3

dev_dependencies:
  flutter_test:
    sdk: flutter
  build_runner:
  framy_generator:

And just to be sure, here is my pubspec.lock:

  flutter_test:
    dependency: "direct dev"
    description: flutter
    source: sdk
    version: "0.0.0"
  framy_annotation:
    dependency: "direct main"
    description:
      name: framy_annotation
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.1.5"
  framy_generator:
    dependency: "direct dev"
    description:
      name: framy_generator
      url: "https://pub.dartlang.org"
    source: hosted
    version: "0.3.0"
  glob:

Is there something else that I need to do to get going with Framy?

MarcinusX commented 4 years ago

hmmm... Can you try running this? flutter pub run build_runner build --delete-conflicting-outputs

Rockncoder commented 4 years ago

Thank you for responding so quickly. Unfortunately, it didn't work. Same error message. Here it is:

troymiles@Troys-Super-Book framee % flutter pub run build_runner build --delete-conflicting-outputs
Precompiling executable...
Precompiled build_runner:build_runner.
[INFO] Generating build script...
[INFO] Generating build script completed, took 364ms

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

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

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

[INFO] Running build...
[WARNING] framy_generator:model_builder on lib/main.dart:
inside this build
[WARNING] framy_generator:model_builder on test/widget_test.dart:
inside this build
[INFO] Generating SDK summary...
[SEVERE] framy_generator:model_builder on lib/main.dart:

Bad state: Unexpected diagnostics:
/Users/troymiles/developer/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[SEVERE] framy_generator:model_builder on lib/main.dart:

Bad state: Unexpected diagnostics:
/Users/troymiles/developer/flutter/bin/cache/dart-sdk/lib/core/uri.dart:3259:39 - Expected an identifier.
[INFO] 1.6s elapsed, 1/2 actions completed.
[INFO] 2.7s elapsed, 1/2 actions completed.