Skip to content
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

Generator not working #1

Closed
maxim-saplin opened this issue Aug 1, 2020 · 5 comments
Closed

Generator not working #1

maxim-saplin opened this issue Aug 1, 2020 · 5 comments
Labels
bug Something isn't working

Comments

@maxim-saplin
Copy link

maxim-saplin commented Aug 1, 2020

Tried the steps in the description. I have 2 json files, fast-i18n dependencies are added,flutter packages pub run build_runner build produces no output (except those ones by Hive which also uses build_runner).

image

Contents of strings.i18n.json

{
  "entries": "esntries",
  "search": "Search",
  "type-in": "Type-in text below"
}

Part of the pubspec.yaml:

version: 1.0.0+1

environment:
  sdk: ">=2.7.0 <3.0.0"

dependencies:
  flutter:
    sdk: flutter
  
  provider: ^4.0.2
  shared_preferences: 
  flutter_html: ^1.0.0
  hive: ^1.4.1+1
  hive_flutter: ^0.3.0+2
  sprintf: "^4.0.0"
  archive: ^2.0.13
  flutter_sticky_header: ^0.4.2
  reorderables: ^0.3.2
  double_back_to_close_app: ^1.2.0
  fluttertoast: ^7.0.1
  file_picker: ^1.13.0+1
  fast_i18n: ^1.4.0

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

dependency_overrides:
  flutter_svg: 0.18.0 #Flutter 1.20 and flutter_html issue
  path: 1.6.4
  hive: # custom version remove box key assertion to be ASCII string not greater than 255 chars
    path: ./plugins/hive-1.4.1+1/
  reorderables:
    path: ./plugins/reorderables-0.3.2/

dev_dependencies:
  flutter_test:
    sdk: flutter
  hive_generator: ^0.7.0+2
  build_runner: ^1.10.0
  flutter_launcher_icons: ^0.7.3
  flutter_native_splash: ^0.1.9

And that's flutter packages pub run build_runner build output:

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

[WARNING] Deleted previous snapshot due to missing asset graph.
[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 15.0s

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

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Found 1 declared outputs which already exist on disk. This is likely because the`.dart_tool/build` folder was deleted, or you are submitting generated files to your source repository.
[SEVERE] Conflicting outputs were detected and the build is unable to prompt for permission to remove them. These outputs must be removed manually or the build can be run with `--delete-conflicting-outputs`. The outputs are: lib/models/indexedDictionary.g.dart
@Tienisto
Copy link
Member

Tienisto commented Aug 4, 2020

Thanks for your feedback.
Have you tested the latest version? (1.5.0). I have fix several bugs there.

@Tienisto
Copy link
Member

Tienisto commented Aug 4, 2020

Okay, I have added the hive dependency into the pubspec.yaml and I have used the same version of hive and fast_i18n.
Unfortunately, I could not repoduce the error.

Have you tried cleaning the build using flutter pub run build_runner clean?

@Tienisto Tienisto added the bug Something isn't working label Aug 4, 2020
@maxim-saplin
Copy link
Author

maxim-saplin commented Aug 4, 2020

Hi, I didn't run build_runner clean... Though I've already integrated a different localization plugin, can't test the new version. Thanks for the feedback, I beleive you can close the issue

@Tienisto
Copy link
Member

Tienisto commented Aug 4, 2020

Alright

@Tienisto Tienisto closed this as completed Aug 4, 2020
@sadabwasim
Copy link

flutter pub run build_runner clean
works fine for me, after this flutter pub run build_runner build is working fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants