New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dart:ui types not handled by mobx_codegen properly on Flutter stable/beta #381
Comments
I have this problem too, should I worry about it with another classes? |
This should work, and I have verified that it is working correctly locally. So don't worry. We'll get you fixed up. :) Can you please verify that you're running the latest version of mobx_codegen (0.4.0+1)? What version does your pubspec.lock say it's using? |
When generate files throws this error on Class:
This is the store class:
Generated code:
|
This looks like a bug in the void visitFieldElement(FieldElement element) { } // element is List<dynamic> !!! Note that this is not a bug with |
Do you have a local repro @pavanpodila? @irvine5k, can you attach your entire |
|
@pavanpodila Are you running this test using Flutter's Dart, or a Dart installed standalone? Including the Flutter dependency isn't enough. I was able to uncomment the lines in that commit to see the code generator working appropriately. |
Thanks for the lock @irvine5k. Can I get you to try something? From your project directory, can you run: After that, do you still get the dynamics? |
Yes, I do.
|
Hm. Bear with me. @irvine5k, I created a very simple project, containing only Can you clone https://github.com/shyndman/mobx_list_color_repro, and run |
@shyndman It does not work for me.
|
hm, interesting that the dynamics are implicit here. ok, next. what's your |
|
k, give me a few |
OK, I have a reproduction! Nice. Give me a few more. :) |
Alright, so stable and beta both produce incorrect output. I have verified that two options fix the output:
@pavanpodila and I will introduce tests and a better process to make sure this doesn't happen again. Sorry about that. |
No problem, @shyndman. Thanks for your time. |
After a bit of research, I believe this to be the issue: dart-lang/build#2528 |
Update: Heard back from the Dart folks, and I'm going to take a stab at fixing this in the |
@shyndman Any news? This bug occurred with another classes and was reported in community, unfortunately I can't describe how to reproduce it, seems kinda random. And it's not the first time that I see like it in the Flutterando community. I asked him(member of community that is struggling with this problem) to contribute in this issue but apparently he's not gonna to do it. Maybe this "Category" is using dart:ui in its members but we need investigate if there's other classes with the same problem. There's any "workaround" further this below?
|
Hi @irvine5k, No progress on Is this the |
According him it's a class generated by Moor Versions:
|
Thanks for the info. I believe this is a whole other problem, and one that I've seen before — That said, I'm not a |
Thanks for your response @shyndman and your attention for this issue. I'll reporting more bugs and helping with I can. Let me know about any evolution with this issue, so I can tell to the Flutterando's community. |
Sent a pull over to the |
Pull merged. We're almost there. |
Alright, |
Great news o/ |
This resolves the `dart:ui` resolution problems we've been seeing with some versions of Flutter. Fixes #381
* Upgrade build_resolvers to 1.3.2 This resolves the `dart:ui` resolution problems we've been seeing with some versions of Flutter. Fixes #381 * Enclosing dart:ui in backticks Co-authored-by: Pavan Podila <pavanpodila@users.noreply.github.com>
Some people in the community are reporting to me that the Color class when placed in Observable is generating Dynamic.
And generated it:
The Color class is blocked somehow and we are unable to solve it, has anyone had this problem?
The text was updated successfully, but these errors were encountered: