Closed rubenferreira97 closed 7 months ago
Hi @rubenferreira97, sorry you are facing this issue and thanks for the detailed report.
I am taking a look and will get you an update soon. This should work, though, and I don't believe you're doing anything wrong.
I've released version 0.1.8 of the CLI with a fix for this (it was a simple cache invalidation issue). You can get the latest by running celest upgrade
. Sorry for the hassle and please let me know if you face this problem again or any others!
Thank you for the quick input @dnys1! This issue seems to be solved, however I think it introduced a new issue on flutter hot reload (at least this was working in previous Celest versions):
1. In flutter, change main.dart
and save
:
FutureBuilder(
future: celest.functions.greeting.sayHello('Celest'), // Change 'Celest' to 'CelestA'
builder: (_, snapshot) => switch (snapshot) {
AsyncSnapshot(:final data?) => Text(data),
AsyncSnapshot(:final error?) =>
Text('${error.runtimeType}: $error'),
_ => const CircularProgressIndicator(),
},
),
2. App is reloaded but it still displays Hello, Celest
instead of Hello, CelestA
.
Sorry to bother, but I am testing this product and reporting issues because I really think it has a lot of potential!
Oh no! 😬
I will look into it now. No bother at all! The feedback tells me you care which is great 🥳 please don't stop!
Okay, I added some tests now and believe it is resolved 🤞
Would you be willing to run celest upgrade
again and let me know if everything is working for you, @rubenferreira97?
Hey @dnys1, I've upgraded to Celest 0.1.9, but I'm still encountering the flutter hot reload issue. I'm using Windows and Dart 3.3.0-279.2.beta.
Do you think there might be a stale cache causing this? I managed to get it working once by creating a new project, but subsequent attempts haven't been successful.
For future improvements, could we consider allowing user input after celest start
for actions such as:
reload
: force a reload (similar to hitting save without having the IDE open),invalidate
: recompute cache and reloadAlternatively, adding more celest
commands like celest clean
might be helpful.
Thanks for the extra information. I will continue to look into it. At the moment, I'm not able to reproduce it but I'll keep you posted as I dig more!
Does hot restarting the Flutter app display the correct information?
Hey @dnys1, each time I hot reload flutter gives me a message that my application was restarted, however the old value still appears.
After testing a bit, it seems hot reload is working, but after some time it stops working randomly.
I think I have found the problem. Each time I run celest start
a bunch of dart.exe
and dartaoutruntime.exe
instances are created.
It seems flutter
keeps connected to one of these old dart.exe
instances instead of the new one.
https://github.com/celest-dev/celest/assets/43851289/350b118c-c035-4192-9236-a5845a46cc10
Hey @dnys1, do you need me to do anything else or run any additional tests to help resolve this issue? I have upgraded to Celest version 0.1.13 and this issue still happens. No pressure, just asking!
Hey @rubenferreira97, sorry for the radio silence. I haven't gotten a chance to dive in yet, but I should be able to look at it this weekend!
Sorry for the inconvenience, and thanks for the data you've sent so far!
Hi @rubenferreira97, I believe this is being caused by https://github.com/dart-lang/sdk/issues/49234. I will see what I can do to workaround it! Apologies for the delay and thanks for your patience.
Hi @rubenferreira97, I believe I have fixed this in the latest 0.2.0
version 😃
Would you be willing to run celest upgrade
and try it out?
I also believe this is fixed! Thanks @dnys1!
Steps to reproduce:
1. Given the following code:
functions/location.dart
:lib/models.dart
:functions/location.dart
:2. Change files and
Save All
:lib/models.dart
:3. See crash:
This seems to happen everytime I add or remove any fields from a
model
.