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

Build.yaml no longer valid in latest build_runner #57

Closed
talamaska opened this issue Aug 7, 2020 · 5 comments
Closed

Build.yaml no longer valid in latest build_runner #57

talamaska opened this issue Aug 7, 2020 · 5 comments
Assignees

Comments

@talamaska
Copy link
Contributor

Describe the bug
As noted in the docs I have added the following line in my build.yaml

targets:
  $default:
    sources:        // These lines with comments show how to declare the additional folders
      include:      // which contain the translations. In our case the i18n folder. Sadly
        - i18n/**   // if declare the include block we need to specify all our source folders
        - lib/**    // also.
    builders:
      rosetta:

In result I got some warnings and the generation is not working anymore

[WARNING] The package `my_app_name` does not include some required sources in any of its targets (see their build.yaml file).
  - $package$
[WARNING] Configuring `rosetta:rosetta` in target `sudoku_stats:sudoku_stats` but this is not a known Builder

Also tried setting
rosetta_generator in place of just rosetta

When I remove the builders, the second warning disappears.

To Reproduce
Steps to reproduce the behavior:

  1. update the build_runner to 1.10.1
  2. run flutter packages pub run build_runner build --delete-conflicting-outputs

Expected behavior
No warnings should be thrown

Desktop (please complete the following information):
[√] Flutter (Channel stable, 1.20.1, on Microsoft Windows [Version 10.0.18362.959], locale bg-BG)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 4.0)
[√] VS Code, 64-bit edition (version 1.47.3)
[√] Connected device (1 available)

Flutter 1.20.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2ae34518b8 (35 hours ago) • 2020-08-05 19:53:19 -0700
Engine • revision c8e3b94853
Tools • Dart 2.9.0

@RenatoKiss
Copy link
Member

Hi talamaska!

Can you show a minimal repo or part of your code for help?
I tried to reproduce the issue, but I couldn't.

You should place both rosetta and rosetta_generator into dependencies. Maybe that was your problem.

@RenatoKiss RenatoKiss self-assigned this Sep 15, 2020
@talamaska
Copy link
Contributor Author

No, in the custom build.yaml where we point the folders to parse. We need to add an additional line in the end.
- $package$

@talamaska
Copy link
Contributor Author

You should change it in the example and in the docs. This change comes from build_runner with newer releases around flutter 1.20 release.

@talamaska
Copy link
Contributor Author

@RenatoKiss
Copy link
Member

Changes merged into stable

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

2 participants