Skip to content

[bug]: Flutter 3.38 / Dart 3.10 — visitDotShorthandInvocation analyzer crash in stacked_generator #1180

@Karthikn-n

Description

@Karthikn-n

Describe the bug

I’m writing to report a blocking compatibility issue with the latest Flutter (v3.38.3) / Dart (3.10) SDKs that prevents stacked_generator from running. The analyzer emits an exception for a new AST node (DotShorthandInvocation) and the generator fails with:

W SDK language version 3.10.0 is newer than analyzer language version 3.9.0. Run flutter packages upgrade.
E stacked_generator:stackedRouterGenerator on lib/app/app.dart:
Exception: Missing implementation of visitDotShorthandInvocation
#0 ThrowingAstVisitor._throw (package:analyzer/dart/ast/visitor.dart:2971:5)
#1 ThrowingAstVisitor.visitDotShorthandInvocation (package:analyzer/dart/ast/visitor.dart:2538:66)
#2 DotShorthandInvocationImpl.accept (package:analyzer/src/dart/ast/ast.dart:5459:15)
...
This results in build_runner failing and no generated files (app.g.dart / other generated outputs) being created.

What operating system do you use?

Windows

Information about the installed tooling

Environment & versions

Flutter: 3.38.3

Dart: 3.10.0

stacked: ^3.4.0 (current in my pubspec)

stacked_generator: ^2.0.0

build_runner: ^2.7.1

OS: Windows 10 (local)

environment in pubspec.yaml: sdk: ">=3.0.0 <4.0.0"

Steps to reproduce the issue

Update Flutter to 3.38.3 (flutter upgrade).

Run flutter pub upgrade --major-versions

Run flutter pub get with the pubspec shown above.

Run dart run build_runner build --delete-conflicting-outputs.

Observe the error about visitDotShorthandInvocation and aborted generator — no generated files appear.

Expected behavior

No response

Screenshots

No response

Additional Context

Dart 3.10 introduced a DotShorthandInvocation AST node (or analyzer changed) and the analyzer/parser now encounters it.

ThrowingAstVisitor is invoking visitDotShorthandInvocation but stacked_generator’s visitor/handlers don’t implement it yet, causing a thrown exception.

The analyzer language-level warning SDK language version 3.10.0 is newer than analyzer language version 3.9.0 also hints at transitive analyzer incompatibilities.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions