Stacked-Org/stacked

[bug]: build runner failing on Stacked-generator-1.6.1-pre.1

Opened this issue · 3 comments

Describe the bug

Built build_runner:build_runner.
[INFO] Generating build script completed, took 752ms
[WARNING] ../../.pub-cache/hosted/pub.dev/stacked_generator-1.6.1-pre.1/lib/src/generators/getit/dependency_config_factory.dart:119:51: Error: Undefined name 'InitializableSingleton'.
.instanceOf(const TypeChecker.fromRuntime(InitializableSingleton))) {
^^^^^^^^^^^^^^^^^^^^^^
[INFO] Precompiling build script... completed, took 1.6s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

What operating system do you use?

macOS

Information about the installed tooling

No response

Steps to reproduce the issue

Run dart run build_runner build --delete-conflicting-outputs
stacked: 3.4.2
stacked_services: 1.5.0
stacked_generator: 1.6.1-pre.1

Expected behavior

No response

Screenshots

No response

Additional Context

No response

@johnsonejezie could you do stacked create app pre_test then update the generator to the latest and see if it does the same.

@FilledStacks I'm having the same issue. I'm not using the CLI. I was upgrading from 3.2.6 to 3.4.2 and stacked_generator from 1.3.3.

I have tried both 1.5.2 and 1.6.0 - both give the same error:

$ flutter pub run build_runner watch --delete-conflicting-outputs
Deprecated. Use `dart run` instead.
[INFO] Generating build script completed, took 169ms
[WARNING] ../../.pub-cache/hosted/pub.dev/stacked_generator-1.5.2/lib/src/generators/getit/dependency_config_factory.dart:119:51: Error: Undefined name 'InitializableSingleton'.
        .instanceOf(const TypeChecker.fromRuntime(InitializableSingleton))) {
                                                  ^^^^^^^^^^^^^^^^^^^^^^
[INFO] Precompiling build script... completed, took 3.7s
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.
$ flutter pub run build_runner watch --delete-conflicting-outputs
Deprecated. Use `dart run` instead.
[INFO] Generating build script completed, took 183ms
[WARNING] ../../.pub-cache/hosted/pub.dev/stacked_generator-1.6.0/lib/src/generators/getit/dependency_config_factory.dart:119:51: Error: Undefined name 'InitializableSingleton'.
        .instanceOf(const TypeChecker.fromRuntime(InitializableSingleton))) {
                                                  ^^^^^^^^^^^^^^^^^^^^^^
[INFO] Precompiling build script... completed, took 620ms
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

That usually means the type is not there from the stacked_shared package.

Could you give us a reproducible example please, that would help in us fixing it because we can't reproduce on our side.