dart-lang / sample-pop_pop_win

"Pop, Pop, Win!" is an implementation of Minesweeper in Dart.
https://dart-lang.github.io/sample-pop_pop_win/
BSD 3-Clause "New" or "Revised" License
149 stars 58 forks source link

build_runner 0.4.0 dep breaks sample #58

Closed nilsdoehring closed 6 years ago

nilsdoehring commented 6 years ago

Hey @kevmoo,

As of 0.4.0, build_runner sets ignore_cast_failures to false by default, resulting in runtime errors whenever StageXL fires Events. You can witness this when running this project, for example.

For a quick fix, see https://github.com/nilsdoehring/dartbook/blob/master/build.yaml#L12 how to set the flag to true (I had to unearth that info from build_runner sources).

But, of course we don't want StageXL to produce cast errors in the first place. Unfortunately, neither @bp74 nor I understand why it does. Much appreciated if you could join our discussion.

Thanks!

kevmoo commented 6 years ago

Seems like a bug in DDC. Not PPW. Something with EventTovoid()._check(subscription.eventListener)

kevmoo commented 6 years ago

CC @jmesserly – thoughts?

jmesserly commented 6 years ago

I think this was fixed in https://github.com/bp74/StageXL/pull/310 ?

kevmoo commented 6 years ago

Yup. Thanks!

On Sat, May 12, 2018, 17:37 Jenny Messerly notifications@github.com wrote:

I think this was fixed in bp74/StageXL#310 https://github.com/bp74/StageXL/pull/310 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dart-lang/sample-pop_pop_win/issues/58#issuecomment-388592839, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCit4rPI9eCXXxxVlsGQaKG8uYuzeCks5tx4BLgaJpZM4T8eA9 .

nilsdoehring commented 6 years ago

Sorry, forgot to close this earlier. The root cause was super hard to identify, by the way. Will browser debugging and/or error messages improve before Dart 2 hits stable?

e.g. this was the original error (WS 2018.1.3 EAP, SDK 2.0.0-dev54.0). It did not 'produce' a breakpoint in debugger (don't know the correct lingo here).

bildschirmfoto 2018-05-12 um 18 47 18
kevmoo commented 6 years ago

totally agree, @nilsdoehring – @jmesserly @vsmenon @alan-knight – FYI

...we have done a lot of work to make these types of errors better. But more examples are certainly helpful!

jmesserly commented 6 years ago

Do you know what's printing Uncaught _js_helper.TypeErrorImplementation? Is that JS code or is it Dart code?

I wonder if we have a bug where Dart toString isn't hooked up to JS toString.

nilsdoehring commented 6 years ago

JS, here's Chrome's console output: image

nilsdoehring commented 6 years ago

@jmesserly may I point you to this, where I put together a more elaborate description of the debugging experience.