tokio-rs / mini-redis

Incomplete Redis client and server implementation using Tokio - for learning purposes only
MIT License
3.9k stars 453 forks source link

panic in VSCode terminal #134

Open 1oglop1 opened 1 year ago

1oglop1 commented 1 year ago

Hi I wanted to follow the tutorial and installed miniredis server cargo install mini-redis

then I ran the command mini-redis-server which resulted in panic. The command worked fine in a normal terminal though.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Syntax(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
regex parse error:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 1: (?x)
 2:                 ^(?P<global_level>(?i:trace|debug|info|warn|error|off|[0-5]))$ |
                                          ^
 3:                  #                 ^^^.
 4:                  #                     `note: we match log level names case-insensitively
 5:                 ^
 6:                 (?: # target name or span name
 7:                     (?P<target>[\w:-]+)|(?P<span>\[[^\]]*\])
 8:                 ){1,2}
 9:                 (?: # level or nothing
10:                     =(?P<level>(?i:trace|debug|info|warn|error|off|[0-5]))?
11:                      #          ^^^.
12:                      #              `note: we match log level names case-insensitively
13:                 )?
14:                 $
15:                 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
error: Unicode-aware case insensitivity matching is not available (make sure the unicode-case feature is enabled)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)', /Users/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-subscriber-0.2.25/src/filter/env/directive.rs:167:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

feel free to close this as won't fix so this issue at least serves for informational purpose :)

dzfranklin commented 10 months ago

This isn't specific to the vscode terminal. I think this is https://github.com/tokio-rs/tracing/issues/2573

The root cause seems to be a semver bug in an outdated dependency but you can fix this by installing the exact versions specified in the lockfile via

> cargo install mini-redis --locked

cargo install mini-redis --locked --force if it's already installed).

The tutorial should probably change the suggested command to that.