Skip to content

Regex parse error at tracing-subscriber-0.3.16\src\filter\env\directive.rs:140:10 #2565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dbidwell94 opened this issue Apr 21, 2023 · 8 comments

Comments

@dbidwell94
Copy link
Contributor

Bug Report

Version

0.3.16

Platform

Windows 11 64bit

Crates

sea-orm-cli

Description

Crate fails to build due to the following error:

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)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)', C:\Users\dbidw\.cargo\registry\src\github.com-1ecc6299db9ec823\tracing-subscriber-0.3.16\src\filter\env\directive.rs:140:10
@billy1624
Copy link

billy1624 commented Apr 21, 2023

Seems like manually enable the unicode-case feature in regex inside the application Cargo.toml would work.

regex = { version = "1", features = ["unicode-case"] }

However, I think tracing-subscriber should enable the unicode-case feature in regex by default.

@dbidwell94
Copy link
Contributor Author

You beat me to it!

@billy1624
Copy link

Detailed Discord chat log: https://discord.com/channels/873880840487206962/1098838564290187324

@dbidwell94
Copy link
Contributor Author

I have submitted a PR for approval which should fix this issue.

@BurntSushi
Copy link

I posted an analysis of what I believe is happening here: rust-lang/regex#982 (comment)

@dbidwell94
Copy link
Contributor Author

I posted an analysis of what I believe is happening here: rust-lang/regex#982 (comment)

I have taken your feedback and refactored the regex in the PR instead of adding the features. Thanks!

@hawkw hawkw closed this as completed in 998774e Apr 21, 2023
hawkw pushed a commit that referenced this issue Apr 21, 2023
… dependency (#2566)

 ## Motivation

Missing features for the `regex` crate were causing build time errors
due to the the use of unicode characters in the regex without using
the proper features within the regex crate

 ## Solution

Add the missing feature flags.

Fixes #2565

Authored-by: Devin Bidwell <[email protected]>
hawkw pushed a commit that referenced this issue Apr 21, 2023
… dependency (#2566)

 ## Motivation

Missing features for the `regex` crate were causing build time errors
due to the the use of unicode characters in the regex without using
the proper features within the regex crate

 ## Solution

Add the missing feature flags.

Fixes #2565

Authored-by: Devin Bidwell <[email protected]>
hawkw pushed a commit that referenced this issue Apr 21, 2023
… dependency (#2566)

 ## Motivation

Missing features for the `regex` crate were causing build time errors
due to the the use of unicode characters in the regex without using
the proper features within the regex crate

 ## Solution

Add the missing feature flags.

Fixes #2565

Authored-by: Devin Bidwell <[email protected]>
alexjg added a commit to automerge/automerge that referenced this issue Apr 22, 2023
Due to a series of unfortunate events involving feature resoution and
the tracing-subscriber and regex crates, the tracing-subscriber
integration in our tests was crashing. This is detailed here:
tokio-rs/tracing#2565

For now we work around this by adding a dev dependency on regex which
enables the required features. tracing-subscriber will be updated
shortly and then we will need to get the updated tracing-subscriber into
test-log and then we can relax.
alexjg added a commit to automerge/automerge that referenced this issue Apr 22, 2023
Due to a series of unfortunate events involving feature resoution and
the tracing-subscriber and regex crates, the tracing-subscriber
integration in our tests was crashing. This is detailed here:
tokio-rs/tracing#2565

For now we work around this by adding a dev dependency on regex which
enables the required features. tracing-subscriber will be updated
shortly and then we will need to get the updated tracing-subscriber into
test-log and then we can relax.
alexjg added a commit to automerge/automerge that referenced this issue Apr 22, 2023
Due to a series of unfortunate events involving feature resoution and
the tracing-subscriber and regex crates, the tracing-subscriber
integration in our tests was crashing. This is detailed here:
tokio-rs/tracing#2565

For now we work around this by adding a dev dependency on regex which
enables the required features. tracing-subscriber will be updated
shortly and then we will need to get the updated tracing-subscriber into
test-log and then we can relax.
str4d added a commit to str4d/mostly-harmless that referenced this issue Apr 22, 2023
@hawkw
Copy link
Member

hawkw commented Apr 22, 2023

Should be fixed now, sorry about that! https://github.com/tokio-rs/tracing/releases/tag/tracing-subscriber-0.3.17

@billy1624
Copy link

Thanks!! @hawkw for the quick PATCH release :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants