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

Last exercise not marked "DONE" #2024

Closed
Nahor opened this issue Jul 5, 2024 · 4 comments
Closed

Last exercise not marked "DONE" #2024

Nahor opened this issue Jul 5, 2024 · 4 comments

Comments

@Nahor
Copy link
Contributor

Nahor commented Jul 5, 2024

(v6.0.1) After finishing all the exercises and restarting restlings, if one goes to the list view, the last exercise is still marked "pending" and the progress bar is incomplete (93/94)

@mo8it
Copy link
Contributor

mo8it commented Jul 6, 2024

This is intentional so people can repeat exercises. One can just enter n to mark the exercise as "done" again :)

@mo8it mo8it closed this as completed Jul 6, 2024
@mo8it mo8it closed this as not planned Won't fix, can't repro, duplicate, stale Jul 6, 2024
@Nahor
Copy link
Contributor Author

Nahor commented Jul 6, 2024

One can just enter n to mark the exercise as "done" again

That's the issue. I did do n, and rustlings ran a last check on all the exercises and quit with the congratulation screen. Then I restarted rustlings and that last exercise is NOT mark "done".

This is intentional so people can repeat exercises.

Even if an exercise is marked "done", one can still do it repeat it, e.g. by using the "continue at" option in the list view.
And for that matter, when doing that "continue at", an exercise does not become "pending", even though it's the same thing as restarting rustlings after it finished, in which case, rustlings is kind of doing a "continue at [last exercise]".


For info, the same happen with a different exercise by doing the following:

  • after completing the last exercise, go to the list view instead of pressing n
  • while on the list view, modify a previous exercise so that it does not succeed anymore
  • quit the list view (last exercise still selected) and press n
    => this will run the check on all the exercises, fail on the modified one and select it
  • fix the modified exercise and press n again
    => this will run the check again, succeed and quit rustlings
  • restart rustlings (the modified exercise will be automatically selected)
  • go to the list view

Result: the last exercise (#94) will be mark "done", but the one that was modified will be "pending".
While this is consistent with the issue I raised, it is inconsistent with the normal behavior. Just because an exercise is that last one to be finished of the whole series, it does not get marked "done" when pressing n.


My expectation would be for rustlings to indeed select the last exercise that was completed, but for that exercise to be flagged "done" in the list view anyway (since it was finished and the user tried to go to the next exercise, but since there were none rustlings exited instead).

@mo8it mo8it reopened this Jul 6, 2024
@mo8it
Copy link
Contributor

mo8it commented Jul 7, 2024

Oh, yes, this is obviously a bug. I fixed it in 01b8432. Thank you for the detailed explanation and sorry for my misunderstanding 🤗

@mo8it mo8it closed this as completed Jul 7, 2024
@Nahor
Copy link
Contributor Author

Nahor commented Jul 7, 2024

Confirming fixed. Thanks.

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

No branches or pull requests

2 participants