GithubHelp home page GithubHelp logo

Comments (10)

Adwaithnow avatar Adwaithnow commented on September 22, 2024 5

I resolved the warning related to build_resolvers. I have deleted auto generated route dart file and rerunning the build_runner, the warning was no longer present.

from auto_route_library.

Thioby avatar Thioby commented on September 22, 2024 4

add this to build.yaml

global_options:
  auto_route_generator:auto_router_generator:
    runs_before:
      - build_resolvers:transitive_digests

from auto_route_library.

Milad-Akarie avatar Milad-Akarie commented on September 22, 2024 2

@Thioby try updating to the latest auto_router_generator and see if you still go the issue?

from auto_route_library.

Thioby avatar Thioby commented on September 22, 2024 2

@Milad-Akarie works! This issue can be closed.

from auto_route_library.

VinhNgT avatar VinhNgT commented on September 22, 2024

I resolved the warning related to build_resolvers. I have deleted auto generated route dart file and rerunning the build_runner, the warning was no longer present.

Yes, re-running build-runner won't trigger the warning. But it appears again every time the source file is changed

For example, changing "@AutoRouterConfig()" to "@AutoRouterConfig(replaceInRouteName: '')" and then run build-runner will trigger the warning

from auto_route_library.

rd-martin-jaeger avatar rd-martin-jaeger commented on September 22, 2024

Same here.
Seems to be related to this commit. I'm still trying to understand and searching for a solution

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.13.4, on macOS 13.5.2 22G91 darwin-arm64, locale en-DE)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Android Studio (version 2022.3)

from auto_route_library.

eggp avatar eggp commented on September 22, 2024

Same here and extra error:

Invalid argument(s): Missing library: package:..... :(

environment:
sdk: '>=3.1.2 <4.0.0'

dep:
auto_route: 7.8.3
devDep:
auto_route_generator: 7.3.1
build_runner: 2.3.3 (and 2.4.6 same as)

from auto_route_library.

eggp avatar eggp commented on September 22, 2024

I created reproduction repository:

https://github.com/eggp/auto_router_error (flutter 3.13.4)

  1. clone main branch
    2023-09-16_23-28

reproduce:

  1. flutter pub get
  2. dart run build_runner build --delete-conflicting-outputs --verbose

rerun: dart run build_runner build --delete-conflicting-outputs --verbose
2023-09-16_23-28_1


  1. clone when_use_navigate_to_in_page_or_imported_reference branch
    2023-09-16_23-33

reproduce:

  1. change branch: ....
  2. delete .dart_tool directory (simulate clean install, because remove all cache!)
  3. flutter pub get
  4. dart run build_runner build --delete-conflicting-outputs --verbose

rerun: dart run build_runner build --delete-conflicting-outputs --verbose
2023-09-16_23-34


summary:

I could not simulate the error indicated in my previous comment, but I could simulate the error indicated by others.
It seems that if there is already a cache in the .dart_tool folder, the error does not appear until a code change induces it.
This would be fine in a local build environment, but in ci, for example, we generate the routes again, where the error occurs. Or even in a monorepo environment..., and this leads to even more special errors than mine: Invalid argument(s): Missing library: package:...

from auto_route_library.

eggp avatar eggp commented on September 22, 2024

temporary solution: replace call named routing methods

from auto_route_library.

PawlikMichal25 avatar PawlikMichal25 commented on September 22, 2024

It's also happening in our project, however the generation fails.
The log is super long and ends with:

#1      LibraryContext.remove (package:analyzer/src/dart/analysis/library_context.dart:265:20)
#2      AnalysisDriver._removePotentiallyAffectedLibraries (package:analyzer/src/dart/analysis/driver.dart:1777:22)
#3      AnalysisDriver._applyPendingFileChanges (package:analyzer/src/dart/analysis/driver.dart:1243:7)
#4      AnalysisDriverScheduler._run (package:analyzer/src/dart/analysis/driver.dart:2152:18)
<asynchronous suspension>
]

from auto_route_library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.