Commit graph

61 commits

Author SHA1 Message Date
mo8it
685e069c58 First PR review changes 2024-10-10 19:43:35 +02: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
554301b8e9 Clear terminal before final check in watch mode 2024-09-24 16:12:44 +02:00
mo8it
2d26358602 Use the thread builder and handle the spawn error 2024-09-06 15:40:25 +02:00
mo8it
dcad002057 Only render when needed 2024-09-05 17:32:59 +02:00
mo8it
247bd19f93 Canonicalize exercise paths only once 2024-09-04 02:19:45 +02:00
mo8it
ac62a3713c Fix typo 2024-09-01 20:31:16 +02:00
mo8it
fd2bf9f6f6 Simplify next_pending_exercise_ind 2024-08-29 01:59:04 +02:00
mo8it
fc1f9f0124 Optimize reading and writing the state file 2024-08-29 01:56:45 +02:00
mo8it
789492d1a9 The number of exercises can't be zero, but still 2024-08-29 00:32:58 +02:00
mo8it
afc320bed4 Fix error about too many open files during the final check 2024-08-29 00:17:22 +02:00
mo8it
cba4a6f9c8 Only disable links in VS code in the list 2024-08-28 01:19:53 +02:00
mo8it
5556d42b46 Use sol_path 2024-08-28 01:10:19 +02:00
mo8it
b1898f6d8b Use queue instead of Stylize 2024-08-25 23:53:50 +02:00
mo8it
64772544fa Final touches :D 2024-08-25 20:29:54 +02:00
mo8it
e41c3a7c92 Use fixed seeds with ahash 2024-08-08 23:48:54 +02:00
Remo Senekowitsch
dc0ffbe16e Replace hashbrown with ahash
hashbrown is already used in the standard library, but we want the
improved performance of the different hash algorithm.
Using ahash directly conveys this intent more clearly.
2024-08-08 11:12:17 +02:00
mo8it
5016c7cf7c Use trim_ascii instead of trim 2024-08-02 16:28:05 +02:00
mo8it
c7590dd752 Improve the runner 2024-08-01 15:23:54 +02:00
mo8it
74fab994e2 Make the output optional 2024-07-28 20:30:23 +02:00
mo8it
3a99542f73 Run the final check in parallel 2024-07-28 17:39:46 +02:00
mo8it
1937b4bf66 Use the rexported crossterm from ratatui 2024-07-25 16:26:48 +02:00
mo8it
01b8432d58 Mark the last exercise as done 2024-07-07 13:55:39 +02:00
mo8it
611f9d8722 Check that all solutions run successfully 2024-06-01 21:48:15 +02:00
mo8it
d48e86b154 Use public comments for public items 2024-05-13 21:40:40 +02:00
mo8it
39a19f9450 Document exercise 2024-05-13 21:36:20 +02:00
mo8it
4ae3fcc3ca Don't skip exercises on file changes 2024-05-13 17:06:11 +02:00
mo8it
f9e35a4344 Improve input handling 2024-05-13 02:32:25 +02:00
mo8it
d9df809838 Optimize embedded dirs 2024-05-12 17:40:53 +02:00
mo8it
563727f47f test next_pending_exercise_ind 2024-04-30 02:14:20 +02:00
mo8it
52c0f5b39e Fix clearing the terminal 2024-04-30 01:41:08 +02:00
mo8it
fef66b80ad Implement From<ExerciseInfo> for Exercise 2024-04-30 01:39:31 +02:00
mo8it
b6f40f2ec8 Document main and app_state 2024-04-29 17:01:47 +02:00
mo8it
cdeb8ce229 Fix initialization 2024-04-27 17:31:51 +02:00
mo8it
c82c367324 Respect the target-dir config and show tests' output 2024-04-27 04:14:59 +02:00
mo8it
2af0cd9cce Replace mode by test and strict_clippy 2024-04-25 03:25:45 +02:00
mo8it
f92d45fa68 Use write macros instead of write_fmt 2024-04-25 02:03:26 +02:00
mo8it
67fa017742 Use os_pipe 2024-04-25 01:56:01 +02:00
mo8it
8a085a0a85 Dump solution and show its path 2024-04-24 02:52:30 +02:00
mo8it
e4ee2cd548 Don't write solutions in debug mode 2024-04-24 00:48:58 +02:00
mo8it
b77007887c Write the solution file on done 2024-04-24 00:47:46 +02:00
mo8it
2dac8e509b Refactor embedded files to add solutions 2024-04-23 19:18:25 +02:00
mo8it
30040d7778 Add a disclaimer to the state file 2024-04-21 23:39:44 +02:00
mo8it
01e6732e4d Improve resetting 2024-04-18 12:41:17 +02:00
mo8it
2e9b9a9f13 Move constant 2024-04-18 11:21:39 +02:00
mo8it
c613b70363 Print the trimmed final message 2024-04-14 17:28:01 +02:00