codewars / runner

Issue tracker for Code Runner
34 stars 8 forks source link

Rust: can't run tests, Cargo.toml is missing #316

Open jcsahnwaldt opened 1 month ago

jcsahnwaldt commented 1 month ago

Describe the bug In some cases, running the tests of a Rust kata doesn't work. It only produces the error message error: could not find Cargo.toml in /workspace or any parent directory.

To Reproduce I wanted run the tests of this kata translation, so I forked it and clicked "Run": https://www.codewars.com/kumite/62c5f8109192360056290ca5?sel=62c5f8109192360056290ca5 But I only got error: could not find Cargo.toml

I get the same error message when I click "Test" or "Attempt" on this kata: https://www.codewars.com/kata/523b66342d0c301ae400003b/train/rust Maybe because it's retired? But I'd still like to be able to run the tests.

Expected behavior When I click "Run" / "Test" / "Attempt", I expect to see the test results.

error256 commented 1 month ago

The kumite has Rust 1.60 selected, but it doesn't work in 1.60, it works when it's changed to 1.66, so it's the wrong version selected. But the output on the kumite page is green, so there probably is some bug somewhere. The kata has Rust 1.66 unavailable (gray) in the version selector, but it's selected as the only version. So it's something about version incompatibility too.

hobovsky commented 1 month ago

Is it problem with approved translations, or with pending translations?

This issue occurs when a Rust translation uses Rust 1.60 instead of 1.66. In pending translations, this is normal, because they were created for Rust 1.60 and not switched to Rust 1.66. You need to fork, switch, and republish.

For approved translations available for training, this should not happen, but sometimes does due to a known bug. Fix is the same: fork, change the version, republish, approve. You can raise issue in a kata affected by this problem.