From 17759a912e82ff972b496e2aa0ee8edf23e4e607 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 8 Feb 2020 10:25:52 +0100 Subject: [PATCH] Ignore PATH change Cargo itself changes the PATH. So `libsqlite3-sys` is always rebuilt on Windows platform. To avoid this, we ignore PATH change. If the PATH has been modified in such a way that a different SQLite library is found, you will have to also modify SQLITE3_LIB_DIR to make cargo rebuild `libsqlite3-sys` Fix #435. --- libsqlite3-sys/build.rs | 3 --- src/vtab/mod.rs | 16 ++++++++-------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs index bab6d1e..af13d71 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -199,9 +199,6 @@ mod build_linked { println!("cargo:rerun-if-env-changed={}_INCLUDE_DIR", env_prefix()); println!("cargo:rerun-if-env-changed={}_LIB_DIR", env_prefix()); println!("cargo:rerun-if-env-changed={}_STATIC", env_prefix()); - if cfg!(target_os = "windows") { - println!("cargo:rerun-if-env-changed=PATH"); - } if cfg!(all(feature = "vcpkg", target_env = "msvc")) { println!("cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC"); } diff --git a/src/vtab/mod.rs b/src/vtab/mod.rs index d589ba2..908c5f5 100644 --- a/src/vtab/mod.rs +++ b/src/vtab/mod.rs @@ -254,14 +254,14 @@ pub enum IndexConstraintOp { SQLITE_INDEX_CONSTRAINT_LT, SQLITE_INDEX_CONSTRAINT_GE, SQLITE_INDEX_CONSTRAINT_MATCH, - SQLITE_INDEX_CONSTRAINT_LIKE, // 3.10.0 - SQLITE_INDEX_CONSTRAINT_GLOB, // 3.10.0 - SQLITE_INDEX_CONSTRAINT_REGEXP, // 3.10.0 - SQLITE_INDEX_CONSTRAINT_NE, // 3.21.0 - SQLITE_INDEX_CONSTRAINT_ISNOT, // 3.21.0 - SQLITE_INDEX_CONSTRAINT_ISNOTNULL, // 3.21.0 - SQLITE_INDEX_CONSTRAINT_ISNULL, // 3.21.0 - SQLITE_INDEX_CONSTRAINT_IS, // 3.21.0 + SQLITE_INDEX_CONSTRAINT_LIKE, // 3.10.0 + SQLITE_INDEX_CONSTRAINT_GLOB, // 3.10.0 + SQLITE_INDEX_CONSTRAINT_REGEXP, // 3.10.0 + SQLITE_INDEX_CONSTRAINT_NE, // 3.21.0 + SQLITE_INDEX_CONSTRAINT_ISNOT, // 3.21.0 + SQLITE_INDEX_CONSTRAINT_ISNOTNULL, // 3.21.0 + SQLITE_INDEX_CONSTRAINT_ISNULL, // 3.21.0 + SQLITE_INDEX_CONSTRAINT_IS, // 3.21.0 SQLITE_INDEX_CONSTRAINT_FUNCTION(u8), // 3.25.0 }