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_runner - Missing library material #1859

Open
FufferKS opened this issue Feb 13, 2024 · 3 comments
Open

build_runner - Missing library material #1859

FufferKS opened this issue Feb 13, 2024 · 3 comments

Comments

@FufferKS
Copy link

Hi, I recently started trying to optimise my build_runner.
Something tipped of intermittent failures. On CI, from clean state, most succeed, but some report this error:

[SEVERE] auto_route_generator on lib/features/subscriptions/presentation/subscriptions_page.dart:

Invalid argument(s): Missing library: package:flutter/material.dart

It might be due to a rule I've added to build.yaml:

      auto_route_generator:
        generate_for:
          include:
            - lib/**routing**.dart
            - lib/**page**.dart

But I am not 100% sure since the problem is non deterministic.

I'm running on:

  injectable: 2.3.2
  injectable_generator: 2.4.1
  analyzer: 5.13.0
  flutter: 3.13.9
@FufferKS
Copy link
Author

update - still happens when I got rid of the build.yaml custom rules, so it's not that :/

@matt-hall-zory
Copy link

matt-hall-zory commented Apr 2, 2024

I'm also seeing intermittent build_runner issues with "Missing Library"
I logged the issue with dart-lang, but I'm in way over my head :)
dart-lang/build#3657
Rolling back flutter a few versions seems to fix the issue.

@matt-hall-zory
Copy link

I did manage to find a workaround. Each time I hit a file that's "missing library", I modify it with a comment, then run build runner again. Eventually I iron out the order kinks then I go back and delete the temporary comments I used to touch those files.

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