From 092cf0b3cafed3df12d8773c63f84720102f3e1d Mon Sep 17 00:00:00 2001 From: Pratik Karki Date: Thu, 19 Mar 2026 00:23:20 +0545 Subject: [PATCH] Bump fancy-regex to v0.17.0 (#51549) This fixes "Error compiling regex: Look-behind assertion without constant size" when using variable-length lookbehinds in search, such as `(?<=^(?:\s{4})*)\s{4}`. fancy-regex 0.17.0 adds support for variable-length lookbehinds using regex-automata's DFA reverse search commit: https://github.com/fancy-regex/fancy-regex/commit/b58fb31 Closes #50219 Before you mark this PR as ready for review, make sure that you have: - [x] Added a solid test coverage and/or screenshots from doing manual testing - [x] Done a self-review taking into account security and performance aspects - [x] Aligned any UI changes with the [UI checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) Release Notes: - Fixed the error message on compilation of regular expressions containing variable length lookbehind assertions Previously: image Now: image Thanks to @vorahardik7 for helping out with a test example and @AmaanBilwar for suggesting a fix! Signed-off-by: Pratik Karki --- Cargo.lock | 17 ++++++++++++++--- Cargo.toml | 2 +- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc7acbbb8fdb870b951b61090b7238d453b03e12..ed17474f832d77f4fa5dd3471ecf1b5b098d4c77 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6184,6 +6184,17 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "fancy-regex" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72cf461f865c862bb7dc573f643dd6a2b6842f7c30b07882b56bd148cc2761b8" +dependencies = [ + "bit-set", + "regex-automata", + "regex-syntax", +] + [[package]] name = "fast-srgb8" version = "1.0.0" @@ -9154,7 +9165,7 @@ dependencies = [ "bytecount", "data-encoding", "email_address", - "fancy-regex", + "fancy-regex 0.16.2", "fraction", "getrandom 0.3.4", "idna", @@ -13144,7 +13155,7 @@ dependencies = [ "dap", "encoding_rs", "extension", - "fancy-regex", + "fancy-regex 0.17.0", "fs", "futures 0.3.31", "fuzzy", @@ -17608,7 +17619,7 @@ dependencies = [ "anyhow", "base64 0.22.1", "bstr", - "fancy-regex", + "fancy-regex 0.16.2", "lazy_static", "regex", "rustc-hash 1.1.0", diff --git a/Cargo.toml b/Cargo.toml index 699c795710f327ce76e7c3203dcb978508c5b830..3b8ddd6404bcfd115e5ead25601e944197053bd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -556,7 +556,7 @@ emojis = "0.6.1" env_logger = "0.11" encoding_rs = "0.8" exec = "0.3.1" -fancy-regex = "0.16.0" +fancy-regex = "0.17.0" fork = "0.4.0" futures = "0.3" futures-concurrency = "7.7.1"