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

Unable to generate code with the latest version of Flutter/Dart #1032

Open
g123k opened this issue Jan 30, 2025 · 1 comment
Open

Unable to generate code with the latest version of Flutter/Dart #1032

g123k opened this issue Jan 30, 2025 · 1 comment

Comments

@g123k
Copy link
Contributor

g123k commented Jan 30, 2025

Hi!

I would like to implement #1031, but unfortunately, I can't due to this error:

Building package executable... 
Failed to build build_runner:build_runner:
../../../.pub-cache/hosted/pub.dev/dart_style-2.3.2/lib/src/source_visitor.dart:593:19: Error: The getter 'inlineKeyword' isn't defined for the class 'ClassDeclaration'.
 - 'ClassDeclaration' is from 'package:analyzer/src/dart/ast/ast.dart' ('../../../.pub-cache/hosted/pub.dev/analyzer-6.11.0/lib/src/dart/ast/ast.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'inlineKeyword'.
    modifier(node.inlineKeyword);
                  ^^^^^^^^^^^^^
Failed to update packages.

Is-it OK to upgrade the dependencies (at least analyzer & test)?

@monsieurtanuki
Copy link
Contributor

@g123k Very strange, I've just tested:

PS C:\Users\fabri\StudioProjects\openfoodfacts-dart> dart run build_runner build
Building package executable... (1.9s)
Built build_runner:build_runner.
[INFO] Generating build script completed, took 547ms
[INFO] Reading cached asset graph completed, took 223ms
[INFO] Checking for updates since last build completed, took 1.3s
[INFO] Running build completed, took 18.7s
[INFO] Caching finalized dependency graph completed, took 280ms
[INFO] Succeeded after 19.0s with 164 outputs (363 actions)
PS C:\Users\fabri\StudioProjects\openfoodfacts-dart> flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.27.3, on Microsoft Windows [version 10.0.26100.2894], locale fr-FR)
[✓] Windows Version (Installed version of Windows is version 10 or higher)
[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.1)
[✓] Chrome - develop for the web
[✗] Visual Studio - develop Windows apps
    ✗ Visual Studio not installed; this is necessary to develop Windows apps.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components
[✓] Android Studio (version 2024.2)
[✓] Connected device (4 available)
[✓] Network resources

! Doctor found issues in 1 category.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants