You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by mg...@apache.org on 2023/08/21 07:51:11 UTC

[avro] branch avro-3838-use-regex-lite created (now e710f37f4)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a change to branch avro-3838-use-regex-lite
in repository https://gitbox.apache.org/repos/asf/avro.git


      at e710f37f4 AVRO-3838: [Rust] Replace "regex" with "regex-lite"

This branch includes the following new commits:

     new e710f37f4 AVRO-3838: [Rust] Replace "regex" with "regex-lite"

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[avro] 01/01: AVRO-3838: [Rust] Replace "regex" with "regex-lite"

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch avro-3838-use-regex-lite
in repository https://gitbox.apache.org/repos/asf/avro.git

commit e710f37f4489dae5831d24228b4cddc84615a9a2
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Aug 21 10:50:00 2023 +0300

    AVRO-3838: [Rust] Replace "regex" with "regex-lite"
    
    Reduces the time for `cargo clean && cargo build --release" from 30secs
    to 22secs on my dev machine
    
    Signed-off-by: Martin Tzvetanov Grigorov <mg...@apache.org>
---
 lang/rust/Cargo.lock         | 8 +++++++-
 lang/rust/avro/Cargo.toml    | 2 +-
 lang/rust/avro/src/schema.rs | 2 +-
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lang/rust/Cargo.lock b/lang/rust/Cargo.lock
index bf7fc242a..fbb4fb941 100644
--- a/lang/rust/Cargo.lock
+++ b/lang/rust/Cargo.lock
@@ -81,7 +81,7 @@ dependencies = [
  "pretty_assertions",
  "quad-rand",
  "rand",
- "regex",
+ "regex-lite",
  "serde",
  "serde_json",
  "sha2",
@@ -883,6 +883,12 @@ dependencies = [
  "regex-syntax 0.7.4",
 ]
 
+[[package]]
+name = "regex-lite"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f96ede7f386ba6e910092e7ccdc04176cface62abebea07ed6b46d870ed95ca2"
+
 [[package]]
 name = "regex-syntax"
 version = "0.6.29"
diff --git a/lang/rust/avro/Cargo.toml b/lang/rust/avro/Cargo.toml
index 29ef270d8..872753dbf 100644
--- a/lang/rust/avro/Cargo.toml
+++ b/lang/rust/avro/Cargo.toml
@@ -62,7 +62,7 @@ lazy_static = { default-features = false, version = "1.4.0" }
 libflate = { default-features = false, version = "2.0.0", features = ["std"] }
 log = { default-features = false, version = "0.4.20" }
 num-bigint = { default-features = false, version = "0.4.3" }
-regex = { default-features = false, version = "1.9.3", features = ["std", "perf"] }
+regex-lite = { default-features = false, version = "0.1.0", features = ["std", "string"] }
 serde = { default-features = false, version = "1.0.183", features = ["derive"] }
 serde_json = { default-features = false, version = "1.0.105", features = ["std"] }
 snap = { default-features = false, version = "1.1.0", optional = true }
diff --git a/lang/rust/avro/src/schema.rs b/lang/rust/avro/src/schema.rs
index 81c978f73..3278a3008 100644
--- a/lang/rust/avro/src/schema.rs
+++ b/lang/rust/avro/src/schema.rs
@@ -19,7 +19,7 @@
 use crate::{error::Error, types, util::MapHelper, AvroResult};
 use digest::Digest;
 use lazy_static::lazy_static;
-use regex::Regex;
+use regex_lite::Regex;
 use serde::{
     ser::{SerializeMap, SerializeSeq},
     Deserialize, Serialize, Serializer,