rust-lang / rust-lang/rustlings

Checking an exercise takes too long

Open
#2,071 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

S-blocked
Dominant language
Rust
Stars
64.2k
Forks
11.3k
Avg merge
5h 24m
Merged PRs (30d)
2

Description

Description

This is the video that the issue happens:

https://github.com/user-attachments/assets/00adc400-8e44-4899-9646-a7cff18bd7aa

It can be shown that every time I update the code of an exercise, the rust-analyzer builds the whole exercises folder (it has like 156 exercises and the extension run the code check for every single of them). During this process, I cannot use any command (h, n, l or q). Only after it finishes, rustlings tells me if my solution is correct or not and directs me to the next exercise.

I don't think it's a bug, but rather a code design issue. If I turn of rust-analyzer, it seems the issue's gone but I still have to wait for like 1-2 seconds for rustlings to detect file changes.

Please look into this issue and fix it. Thanks!

System Information

  • OS: Windows 10 x64 (10.0.19045)
  • VSCode: version 1.19.0
  • rust-analyzer: 0.3.2062
  • rustlings: 6.1.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the delay with rust-analyzer enabled while editing an exercise, then trace how rustlings detects file changes and runs checks across the exercises folder. Done means an edit does not trigger unnecessary checks for every exercise and commands such as h, n, l, and q remain responsive.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, performance, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.