Commit graph

614 commits

Author SHA1 Message Date
mo8it fc5fc0920f Remove outdated comments 2024-10-14 00:48:12 +02:00
mo8it 9705c161b4 Remove the tracking of done and pending 2024-10-14 00:45:41 +02:00
mo8it 8cac21511c Small improvements to showing progress 2024-10-14 00:42:49 +02:00
mo8it 396ee4d618 Show progress with exercise numbers 2024-10-13 23:28:17 +02:00
mo8it 326169a7fa Improve check-all command 2024-10-13 22:02:41 +02:00
mo8it 685e069c58 First PR review changes 2024-10-10 19:43:35 +02:00
Nahor d3f819f86f Add command line command to check all exercises 2024-10-04 14:36:36 -07:00
Nahor aa83fd6bc4 Show a progress bar when running check_all
Replace the "Progress: xxx/yyy" with a progress bar when checking all
the exercises
2024-10-02 15:28:42 -07:00
Nahor e2f7734f37 Limit the amount of parallelism in check_all
Don't create more threads than there are CPU cores.
2024-10-02 14:42:50 -07:00
Nahor 5c17abd1bf Use a channel to update the check_all progress
The previous code was checking the threads in the order they were
created. So the progress update would be blocked on an earlier thread
even if later thread were already done.

Add to that that multiple instances of `cargo build` cannot run in
parallel, they will be serialized instead. So if the exercises needs to
be recompiled, depending on the order those `cargo build` are run,
the first update can be a long time coming.

So instead of relying on the thread terminating, use a channel to get
notified when an exercise check is done, regardless of the order they
finish in.
2024-10-02 14:10:26 -07:00
Nahor c52867eb8b Add command to check all the exercises
This allows for skipping repeating "next" when multiple exercises
are done at once, or when earlier exercises have been updated/changed
(and thus must be redone) while still working of the whole set (i.e.
the final check_all is not yet available to flag those undone exercises)
2024-10-02 13:40:32 -07:00
Nahor 26fd97a209 Update all exercises during the final check
The previous code run the check on all exercises but only updates one
exercise (the first that failed) even if multiple failed. The user won't
be able to see all the failed exercises when viewing the list, and will
have to run check_all after each fixed exercise.

This change will update all the exercises so the user can see all that
failed, fix them all, and only then need run check_all again.
2024-10-02 11:45:55 -07:00
mo8it 0c79f2ea3e Reset in prompt with confirmation 2024-09-26 18:15:45 +02:00
mo8it d4fa61e435 Debounce file change events 2024-09-26 12:26:24 +02:00
mo8it 554301b8e9 Clear terminal before final check in watch mode 2024-09-24 16:12:44 +02:00
mo8it 4e4b65711a Only handle file changes for the current exercise, no jumping back 2024-09-18 01:44:13 +02:00
mo8it 89c40ba256 Optimize the file watcher 2024-09-18 01:43:48 +02:00
mo8it 47f8a0cbe5 Add rust-analyzer.toml on dev new 2024-09-13 16:39:28 +02:00
mo8it 9459eef032 Use Clippy with Rust-Analyzer 2024-09-13 16:38:53 +02:00
mo8it 3947c4de28 Pause input while running an exercise 2024-09-12 17:46:06 +02:00
mo8it 664228ef8b Improve quit message 2024-09-12 17:46:06 +02:00
mo8it 83d1275d72 Add missing # in comment 2024-09-12 17:46:06 +02:00
Ali Bektas 88e10a9e54 hardcode ratoml in init.rs 2024-09-12 15:46:09 +02:00
Ali Bektas 1f624d4c2a Add rust-analyzer.toml file 2024-09-12 15:26:40 +02:00
mo8it 2b7caf6fcb Too polite :P 2024-09-06 16:36:36 +02:00
mo8it 2d26358602 Use the thread builder and handle the spawn error 2024-09-06 15:40:25 +02:00
mo8it 9faa5d3aa4 Avoid asking for terminal size on each rendering 2024-09-05 17:45:27 +02:00
mo8it bcc2a136c8 Add error message when unable to get terminal size 2024-09-05 17:37:34 +02:00
mo8it dcad002057 Only render when needed 2024-09-05 17:32:59 +02:00
mo8it 51b8d2ab25 Remove unused import 2024-09-05 17:23:56 +02:00
mo8it aa3eda70e5 Simplify handling terminal events for unbuffered stdin 2024-09-05 17:12:26 +02:00
mo8it 2d0860fe1b Hide input and disable its line buffering 2024-09-05 02:11:19 +02:00
mo8it 5eb3dee59c Create solution even if the solution's directory is missing 2024-09-05 00:21:24 +02:00
mo8it 247bd19f93 Canonicalize exercise paths only once 2024-09-04 02:19:45 +02:00
mo8it e5ed115288 Match filter once 2024-09-04 01:20:48 +02:00
mo8it 03baa471d9 Simplify handling p in list 2024-09-04 01:07:08 +02:00
mo8it da8b3d143a Final touches to searching 2024-09-04 01:05:30 +02:00
Adhyan f463cf8662 passes clippy lints and removed extra code from the merge 2024-09-03 15:10:44 -06:00
Adhyan 47148e78a3 replaced enumerate() with position(); converted select_if_matches_search_query to apply_search_query 2024-09-03 15:03:25 -06:00
Adhyan fea917c8f2 removed unnecessary update_rows() call and minor refactoring 2024-09-03 14:52:09 -06:00
Adhyan 948e16e3c7 moved continue to end of if-block 2024-09-03 14:40:24 -06:00
Adhyan abf1228a0a search now filters the list first 2024-09-02 10:59:23 -06:00
Adhyan 547a9d947b escape/enter no longer exits the list, exits only the search 2024-09-02 10:45:45 -06:00
Adhyan 92a1214dcd passes clippy lints 2024-09-01 19:05:23 -06:00
Adhyan 388f8da97f removed debug statements 2024-09-01 19:03:33 -06:00
Adhyan e1e316b931 Merge branch 'main' of https://github.com/frroossst/rustlings 2024-09-01 18:56:52 -06:00
Adhyan c4fd29541b added a way to search through list, ref #2093 2024-09-01 18:52:26 -06:00
mo8it a8b13f5a82 Remove "exercises" from the end of the progress bar 2024-09-01 22:04:09 +02:00
mo8it 86fc573d7a Remove the footer separators 2024-09-01 22:02:07 +02:00
mo8it 75a38fa38b Add search to the help footer 2024-09-01 20:44:19 +02:00