You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been working on reverse-string issue. Looking at the Cargo.toml file, it contains [features] grapheme entry, which lead me to believe I can add an optional dependency to the feature. So I did -
I was expecting tests that don't have #[cfg(feature = "grapheme")] annotation to run fine but after submitting my solution to the website, they all fail due to compiler not finding the crate for non-annotated tests.
Exercism test output -
Compiling reverse_string v1.2.0 (/mnt/exercism-iteration)
error[E0432]: unresolved import `unicode_segmentation`
--> src/lib.rs:4:13
|
4 | use unicode_segmentation::UnicodeSegmentation;
| ^^^^^^^^^^^^^^^^^^^^ use of undeclared crate or module `unicode_segmentation`
error[E0599]: no method named `graphemes` found for reference `&str` in the current scope
--> src/lib.rs:5:22
|
5 | return input.graphemes(true).rev().collect::<String>();
| ^^^^^^^^^ method not found in `&str`
Some errors have detailed explanations: E0432, E0599.
For more information about an error, try `rustc --explain E0432`.
error: could not compile `reverse_string` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `reverse_string` due to 2 previous errors
It works fine on my machine (said every developer ever), I assume that the tests that are ran on the exercism end are not running with --all-features flag or something or am I doing something wrong here?
At Exercism we use our Community Forum, not GitHub issues, as the primary place for discussion. That allows maintainers and contributors from across Exercism's ecosystem to discuss your problems/ideas/suggestions without them having to subscribe to hundreds of repositories.
This issue will be automatically closed. Please use this link to copy your GitHub Issue into a new topic on the forum, where we look forward to chatting with you!
If you're interested in learning more about this auto-responder, please read this blog post.
Hi,
I have been working on reverse-string issue. Looking at the
Cargo.toml
file, it contains [features] grapheme entry, which lead me to believe I can add an optional dependency to the feature. So I did -Cargo.toml:
I was expecting tests that don't have
#[cfg(feature = "grapheme")]
annotation to run fine but after submitting my solution to the website, they all fail due to compiler not finding the crate for non-annotated tests.Exercism test output -
And here's my solution to the problem -
It works fine on my machine (said every developer ever), I assume that the tests that are ran on the exercism end are not running with
--all-features
flag or something or am I doing something wrong here?Local env versions -
cargo 1.72.0 (103a7ff2e 2023-08-15)
rustc 1.72.0 (5680fa18f 2023-08-23)
The text was updated successfully, but these errors were encountered: