VeryGoodOpenSource / dart_frog

A fast, minimalistic backend framework for Dart 🎯
https://dartfrog.vgv.dev
MIT License
1.85k stars 147 forks source link

feat(dart_frog_cli): show progress and time taken when reloading #894

Open alestiago opened 1 year ago

alestiago commented 1 year ago

Description

Follow-up from https://github.com/VeryGoodOpenSource/dart_frog/pull/814#discussion_r1280290038.

Upon reload with R, there is no information given on how much time it took to reload. There is also no further visual indication that the process may still be processing the reload.

Suggestion

To use logger.progress to indicate the progress instead of logger.detail or logger.info.

Requirements

dhruvpatidar359 commented 11 months ago

I was looking to contribute on this one . But i am not able to find out the commands to build the package and see the changes . I am new to this , may you guys give some direction .

alestiago commented 11 months ago

Thanks @dhruvpatidar359 for taking the initiative here. This change applies to dart_frog_cli all the contributing documentation can be found within dart_frog_cli CONTRIBUTING markdown file. Let me know if you run into any issues.

Would you like me to assign this to you?

dhruvpatidar359 commented 11 months ago

sure , you may assign this to me .

dhruvpatidar359 commented 11 months ago

@alestiago do we have to write the test cases also ?

alestiago commented 11 months ago

Hi @dhruvpatidar359, yes. Dart Frog CLI has a fixed requirement of 100% test coverage so any code changes should be followed by test changes.

If you would like to generate a local coverage report you can use:

dart test -j 1 --coverage=coverage --platform="vm" &&
dart pub global run coverage:format_coverage --lcov --check-ignore --in=coverage --out="coverage/lcov.info" --package="." --report-on="lib" &&
genhtml -o coverage/html coverage/lcov.info &&
open coverage/html/index.html

Let me know if you run into any issues 🙌 . Thank you for the contribution!

dhruvpatidar359 commented 11 months ago

Alright , so i have written some test cases . They are also passing , but the code coverage still not updated . It says 99.7 % covered . What to do ?

alestiago commented 11 months ago

Hi @dhruvpatidar359 ! Thanks for reaching out!

Regarding the issue you encounter during running the tests (test failures) can you open a new issue with:

I've a suspicion that it might be because your Operating System (OS) differs from the OS the maintainers of this package use.

Regarding the new tests you've made can you push them to your Pull Request branch (dhruvpatidar359:progresshotreload)? That way I can have an easier closer look and we avoid polluting this issue with Pull Request specific implementation details.

dhruvpatidar359 commented 11 months ago

Hi @dhruvpatidar359 ! Thanks for reaching out!

Regarding the issue you encounter during running the tests (test failures) can you open a new issue with:

  • Precise steps you followed and commands you used to get the test failure
  • Flutter doctor output

I've a suspicion that it might be because your Operating System (OS) differs from the OS the maintainers of this package use.

Regarding the new tests you've made can you push them to your Pull Request branch (dhruvpatidar359:progresshotreload)? That way I can have an easier closer look and we avoid polluting this issue with Pull Request specific implementation details.

all right

dhruvpatidar359 commented 11 months ago

@alestiago i have updated the PR

dhruvpatidar359 commented 11 months ago

may you please help me, how can i make it 100 % code coverage ?

alestiago commented 11 months ago

@dhruvpatidar359 I'm more than willing to help. However, you might have to bear with me a bit. I will get to your Pull Request as soon as possible 🙌

dhruvpatidar359 commented 11 months ago

Hi @alestiago what's the update ?

alestiago commented 10 months ago

Hi @dhruvpatidar359 , sorry for the late reply. Since we are likely to refactor the code that will have to get updated and we want to avoid using progress on the daemon we don't foresee to prioritise this work for now.