[stacked_generator] type '_CompactLinkedHashSet<String?>' is not a subtype of type 'Set<String>' in type cast
I'm getting an error when launching
flutter pub run build_runner watch --delete-conflicting-outputs
Source code
pubspec.yaml
dependencies:
...
stacked: ^2.1.3
stacked_services: ^0.8.6
dev_dependencies:
...
build_runner:
stacked_generator: ^0.4.2
app.dart
@StackedApp(
routes: const [
const MaterialRoute(page: HomeView, initial: true),
],
)
class App {}
Logs
[INFO] Generating build script...
[INFO] Generating build script completed, took 772ms
[INFO] Setting up file watchers...
[INFO] Setting up file watchers completed, took 28ms
[INFO] Waiting for all file watchers to be ready...
[INFO] Waiting for all file watchers to be ready completed, took 198ms
[INFO] Initializing inputs
[INFO] Reading cached asset graph...
[INFO] Reading cached asset graph completed, took 111ms
[INFO] Checking for updates since last build...
[INFO] Checking for updates since last build completed, took 1.4s
[INFO] Running build...
[INFO] 1.2s elapsed, 1/2 actions completed.
[INFO] 2.4s elapsed, 1/2 actions completed.
[INFO] 3.5s elapsed, 1/2 actions completed.
[INFO] 4.5s elapsed, 1/2 actions completed.
[INFO] 20.3s elapsed, 1/2 actions completed.
[WARNING] No actions completed for 19.8s, waiting on:
- stacked_generator:stackedFormGenerator on lib/app/app.dart
[SEVERE] stacked_generator:stackedRouterGenerator on lib/app/app.dart:
type '_CompactLinkedHashSet<String?>' is not a subtype of type 'Set<String>' in type cast
[INFO] Running build completed, took 21.1s
[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 89ms
[SEVERE] Failed after 21.2s
@FilledStacks I think the new update is buggy. Getting this error too.
Please try passing a empty dependencies array in your StackedApp
@hurbes not working either with the empty dependencies array
Pushed 0.4.4 now. Sorry about that.
Thanks a lot @FilledStacks!
Looks like the issue still persists in 0.4.4 @FilledStacks
@mychell same
Sorry about that. I would downgrade for now and then wait unitl we fix this. Hopefully by today.
Version 0.3.3 from Apr 8 works. Thanks for the temporary solution :)
@epomeranz does it work with the latest stacked package?
stacked_generator: '<=0.4.1'
This version works too.
Using stacked_generator: '<=0.4.1' doesn't for me but I get a different error. So it's probably unrelated to this bug. The error I get with when using stacked_generator: ^0.4.0 is:
Null check operator used on a null value
package:build_runner/src/generate/watch_impl.dart 189:40 WatchImpl.reader
package:build_runner/src/server/server.dart 50:55 createServeHandler.
Please check the latest version 0.4.5. It should be fixed.
@FilledStacks thanks! It's working over here!