Tensegritics / Tensegritics/ClojureDart

Type cast error on latest blessed sha

Open
#319 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
1.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

Describe the bug

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
The following _TypeError was thrown building watch_widget_caaxye$1(dirty, state:
WatchState#3db53(subscribable: Instance of 'Cell', current value: null)):
type 'AlwaysStoppedAnimation<dynamic>' is not a subtype of type 'Animation<Color?>?' in type cast

The relevant error-causing widget was:
  watch_widget_caaxye$1
  watch_widget_caaxye$1:file:///home/valerauko/[redacted]/lib/cljd-out/[redacted].dart:214:24

When the exception was thrown, this was the stack:
#0      ifn_widget_18695hm$1.$_invoke$1 (package:[redacted]/cljd-out/[redacted]:29:133)
#1      ifn_widget_18695hm$1.$_invoke$0 (package:[redacted]/cljd-out/[redacted]:23:31)
#2      watch_widget_caaxye$1.$_build$2 (package:[redacted]/cljd-out/[redacted]:89:42)
#3      WatchState.build (package:[redacted]/cljd-out/cljd/flutter.dart:1792:67)
#4      StatefulElement.build (package:flutter/src/widgets/framework.dart:5599:27)

The offending widget is as follows

   (f/widget
    m/Center
    m/CircularProgressIndicator
    .valueColor
    (m/AlwaysStoppedAnimation color))

Does your problem persist after clj -M:cljd clean && flutter clean?
Yes

To Reproduce
After cljd upgrade the UI is full of the above exception

Expected behavior
No type cast error

Additional info
Not sure if related but there are also two dynamic warnings

DYNAMIC WARNING: can't resolve member begin on target type dynamic of library dart:core  at line: 678, column: 29, file: cljd/flutter.cljd
DYNAMIC WARNING: can't resolve member lerp on target type dynamic of library dart:core  at line: 678, column: 3, file: cljd/flutter.cljd

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with cljd upgrade and the stated clean commands, then inspect cljd/flutter.cljd around line 678 and the CircularProgressIndicator valueColor handling. Trace why AlwaysStoppedAnimation becomes an incompatible Animation<Color?>?; done means the widget builds without the type-cast exception and the reported dynamic warnings are understood or resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
frontend, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.