Skip to content
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

fix(watch): make sure watch doesn't skip not passing exercises if you change a previous one #1175

Closed
wants to merge 1 commit into from

Conversation

kiskoza
Copy link

@kiskoza kiskoza commented Aug 30, 2022

Hi. Thanks for all the rustling exercises, I loved working on them 🦀

I started with a local git clone of this repo and ran rustlings watch. During my journey I did not solve all of the tasks at once, and sometimes a whole week went away before I got time to open it up again. Hence, I always started with rebasing my local "solutions" branch onto the latest release - first one was 4.8 and I finished the course with 5.2.0. During the rebases I got some conflicts I had to resolve - no problem, I thought I can do it by running rustlings watch and fix broken files. However, it did not work as I imagined: after I solved the first broken file with conflicts in it, the watch command skipped all the other broken files and told me that I'm ready to learn something new. In case I restarted the watcher, it always picked the first broken exercise and skipped the others when I was ready with that one due to the missing // I AM NOT DONE comments.

In my fix I split the exercises into two arrays: the ones before the current file and the ones after it. The exercises in the first group could be skipped when they look done because the watcher already built them since their last modification. However, the files after the current exercise shouldn't be handled as done because we haven't verified yet that they are passing.

I hope this makes sense and you'll find my PR helpful.

@mo8it mo8it self-assigned this Apr 1, 2024
@mo8it
Copy link
Contributor

mo8it commented May 12, 2024

Thanks for the contribution, but this should be fixed in the upcoming v6 :)

@mo8it mo8it closed this May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants