stacked icon indicating copy to clipboard operation
stacked copied to clipboard

[stacked_generator] type '_CompactLinkedHashSet<String?>' is not a subtype of type 'Set<String>' in type cast

Open kodjosama opened this issue 5 years ago • 14 comments

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

kodjosama avatar May 12 '21 18:05 kodjosama

@FilledStacks I think the new update is buggy. Getting this error too.

myklll avatar May 12 '21 22:05 myklll

Please try passing a empty dependencies array in your StackedApp

hurbes avatar May 13 '21 03:05 hurbes

@hurbes not working either with the empty dependencies array

erdiegoant avatar May 13 '21 04:05 erdiegoant

Pushed 0.4.4 now. Sorry about that.

FilledStacks avatar May 13 '21 06:05 FilledStacks

Thanks a lot @FilledStacks!

erdiegoant avatar May 13 '21 06:05 erdiegoant

Looks like the issue still persists in 0.4.4 @FilledStacks

myklll avatar May 13 '21 08:05 myklll

@mychell same

YoussefGheith avatar May 13 '21 12:05 YoussefGheith

Sorry about that. I would downgrade for now and then wait unitl we fix this. Hopefully by today.

FilledStacks avatar May 13 '21 13:05 FilledStacks

Version 0.3.3 from Apr 8 works. Thanks for the temporary solution :)

epomeranz avatar May 13 '21 15:05 epomeranz

@epomeranz does it work with the latest stacked package?

erdiegoant avatar May 13 '21 15:05 erdiegoant

stacked_generator: '<=0.4.1'

This version works too.

Silfalion avatar May 13 '21 16:05 Silfalion

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. package:build_runner/src/server/server.dart 49:20 createServeHandler.

epomeranz avatar May 13 '21 17:05 epomeranz

Please check the latest version 0.4.5. It should be fixed.

FilledStacks avatar May 14 '21 03:05 FilledStacks

@FilledStacks thanks! It's working over here!

erdiegoant avatar May 14 '21 03:05 erdiegoant