jetbrains-academy / rustlings-course

Small exercises to get you used to reading and writing Rust code!
https://github.com/rust-lang/rustlings/releases/tag/1.2.2
MIT License
149 stars 33 forks source link

Interacting with task breaks "Peek solution..." and "Reset Content" after IDE restart #284

Closed DanielMcCord closed 1 year ago

DanielMcCord commented 1 year ago

Steps to reproduce

  1. Interact with one or more tasks: For a programming task, use the "Check" or "Reset Content" buttons. For a theory task, just viewing the task is sufficient. To my knowledge, this course does not have quiz tasks.
  2. Restart the IDE.
  3. Attempt to use "Peek solution..." and/or "Reset Content" on the same task(s) you interacted with.

Expected behavior "Peek solution..." reveals the correct answer and shows the diff, and "Reset Content" restores the original content of the file(s) in the task.

Actual behavior "Peek solution..." does nothing. "Reset Content" blanks out all .rs files in the task (curiously, the Cargo.toml, if present, is reset correctly). Broken behavior persists across IDE restarts.

Other infomation

Workaround Switch back and forth between two installs of the IDE:

235 and #216 seem to be duplicates of this issue.

DaniilBogdanovJB commented 1 year ago

Hello @DanielMcCord ,

I can't reproduce the issue with the latest IDEA, Rust and Academy plugins. Could you please re-download the course and check if the issue is still reproducible?

If it does, please clarify the lesson which we can check and the steps for reproducing. Also, what OS you are using?

DanielMcCord commented 1 year ago

@DaniilBogdanovJB Switching to the proprietary Rust plugin fixes it for me, using the latest CLion on Linux Mint.

Note: JetBrains Academy 2023.9 dropped support for using the deprecated open-source Rust plugin to start the Learn Rust course.