From 7a27a63c329ed845114ec1b7e1cd2b76a6bc34a1 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Fri, 26 Jan 2024 14:45:12 -0800 Subject: [PATCH 01/12] Reduce once_cell appearances --- Cargo.lock | 2 -- cargo-pgrx/src/command/install.rs | 21 ++++++++++++-------- pgrx-pg-sys/Cargo.toml | 1 - pgrx-pg-sys/build.rs | 9 +++++---- pgrx-tests/Cargo.toml | 1 - pgrx-tests/src/framework.rs | 32 ++++++++++++++++--------------- 6 files changed, 35 insertions(+), 31 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34375018e..02873de06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1516,7 +1516,6 @@ dependencies = [ "eyre", "libc", "memoffset", - "once_cell", "pgrx-macros", "pgrx-pg-config", "pgrx-sql-entity-graph", @@ -1552,7 +1551,6 @@ dependencies = [ "clap-cargo", "eyre", "libc", - "once_cell", "owo-colors", "pgrx", "pgrx-macros", diff --git a/cargo-pgrx/src/command/install.rs b/cargo-pgrx/src/command/install.rs index 091bb15e9..2943e4942 100644 --- a/cargo-pgrx/src/command/install.rs +++ b/cargo-pgrx/src/command/install.rs @@ -14,7 +14,6 @@ use crate::profile::CargoProfile; use crate::CommandExecute; use cargo_toml::Manifest; use eyre::{eyre, WrapErr}; -use once_cell::sync::Lazy; use owo_colors::OwoColorize; use pgrx_pg_config::{cargo::PgrxManifestExt, get_target_dir, PgConfig, Pgrx}; use std::collections::HashMap; @@ -22,7 +21,7 @@ use std::fs; use std::io::BufReader; use std::path::{Path, PathBuf}; use std::process::Stdio; -use std::sync::{Arc, Mutex}; +use std::sync::{Arc, Mutex, OnceLock}; /// Type used for memoizing expensive to calculate values. /// `Arc` is needed to get around compiler safety checks. @@ -453,12 +452,14 @@ pub(crate) fn find_library_file( Ok(library_file_path) } -static CARGO_VERSION: Lazy = Lazy::new(|| Arc::new(Mutex::new(HashMap::new()))); +static CARGO_VERSION: OnceLock = OnceLock::new(); pub(crate) fn get_version(manifest_path: impl AsRef) -> eyre::Result { let path_string = manifest_path.as_ref().to_owned(); - if let Some(version) = CARGO_VERSION.lock().unwrap().get(&path_string) { + if let Some(version) = + CARGO_VERSION.get_or_init(Default::default).lock().unwrap().get(&path_string) + { return Ok(version.clone()); } @@ -481,16 +482,20 @@ pub(crate) fn get_version(manifest_path: impl AsRef) -> eyre::Result return Err(eyre!("cannot determine extension version number. Is the `default_version` property declared in the control file?")), }; - CARGO_VERSION.lock().unwrap().insert(path_string, version.clone()); + CARGO_VERSION + .get_or_init(Default::default) + .lock() + .unwrap() + .insert(path_string, version.clone()); Ok(version) } -static GIT_HASH: Lazy = Lazy::new(|| Arc::new(Mutex::new(HashMap::new()))); +static GIT_HASH: OnceLock = OnceLock::new(); fn get_git_hash(manifest_path: impl AsRef) -> eyre::Result { let path_string = manifest_path.as_ref().to_owned(); - if let Some(hash) = GIT_HASH.lock().unwrap().get(&path_string) { + if let Some(hash) = GIT_HASH.get_or_init(Default::default).lock().unwrap().get(&path_string) { Ok(hash.clone()) } else { let hash = match get_property(manifest_path, "git_hash")? { @@ -500,7 +505,7 @@ fn get_git_hash(manifest_path: impl AsRef) -> eyre::Result { )), }; - GIT_HASH.lock().unwrap().insert(path_string, hash.clone()); + GIT_HASH.get_or_init(Default::default).lock().unwrap().insert(path_string, hash.clone()); Ok(hash) } diff --git a/pgrx-pg-sys/Cargo.toml b/pgrx-pg-sys/Cargo.toml index c12f44dea..dfb6b2592 100644 --- a/pgrx-pg-sys/Cargo.toml +++ b/pgrx-pg-sys/Cargo.toml @@ -60,4 +60,3 @@ proc-macro2 = "1.0.69" quote = "1.0.33" syn = { version = "1.0.109", features = [ "extra-traits", "full", "fold", "parsing" ] } shlex = "1.3" # shell lexing, also used by many of our deps -once_cell = "1.18.0" diff --git a/pgrx-pg-sys/build.rs b/pgrx-pg-sys/build.rs index dbe2c640e..55d3a993a 100644 --- a/pgrx-pg-sys/build.rs +++ b/pgrx-pg-sys/build.rs @@ -9,7 +9,6 @@ //LICENSE Use of this source code is governed by the MIT license that can be found in the LICENSE file. use bindgen::callbacks::{DeriveTrait, ImplementsTrait, MacroParsingBehavior}; use eyre::{eyre, WrapErr}; -use once_cell::sync::Lazy; use pgrx_pg_config::{ is_supported_major_version, prefix_path, PgConfig, PgConfigSelector, Pgrx, SUPPORTED_VERSIONS, }; @@ -19,6 +18,7 @@ use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; use std::fs; use std::path::{self, PathBuf}; // disambiguate path::Path and syn::Type::Path use std::process::{Command, Output}; +use std::sync::OnceLock; use syn::{ForeignItem, Item, ItemConst}; const BLOCKLISTED_TYPES: [&str; 3] = ["Datum", "NullableDatum", "Oid"]; @@ -1026,8 +1026,7 @@ fn run_command(mut command: &mut Command, version: &str) -> eyre::Result // Plausibly it would be better to generate a regex to pass to bindgen for this, // but this is less error-prone for now. -static BLOCKLISTED: Lazy> = - Lazy::new(|| build::sym_blocklist::SYMBOLS.iter().copied().collect::>()); +static BLOCKLISTED: OnceLock> = OnceLock::new(); fn is_blocklisted_item(item: &ForeignItem) -> bool { let sym_name = match item { ForeignItem::Fn(f) => &f.sig.ident, @@ -1036,7 +1035,9 @@ fn is_blocklisted_item(item: &ForeignItem) -> bool { ForeignItem::Static(s) => &s.ident, _ => return false, }; - BLOCKLISTED.contains(sym_name.to_string().as_str()) + BLOCKLISTED + .get_or_init(|| build::sym_blocklist::SYMBOLS.iter().copied().collect::>()) + .contains(sym_name.to_string().as_str()) } fn apply_pg_guard(items: &Vec) -> eyre::Result { diff --git a/pgrx-tests/Cargo.toml b/pgrx-tests/Cargo.toml index 2816e3457..077a2d0cb 100644 --- a/pgrx-tests/Cargo.toml +++ b/pgrx-tests/Cargo.toml @@ -58,7 +58,6 @@ thiserror.workspace = true owo-colors.workspace = true clap-cargo = "0.11.0" -once_cell = "1.18.0" postgres = "0.19.7" proptest = { version = "1", optional = true } serde = "1.0" diff --git a/pgrx-tests/src/framework.rs b/pgrx-tests/src/framework.rs index d25ea6ad7..4fcea8e0c 100644 --- a/pgrx-tests/src/framework.rs +++ b/pgrx-tests/src/framework.rs @@ -11,7 +11,6 @@ use std::collections::HashSet; use std::process::{Command, Stdio}; use eyre::{eyre, WrapErr}; -use once_cell::sync::Lazy; use owo_colors::OwoColorize; use pgrx::prelude::*; use pgrx_pg_config::{ @@ -21,7 +20,7 @@ use postgres::error::DbError; use std::collections::HashMap; use std::io::{BufRead, BufReader, Write}; use std::path::PathBuf; -use std::sync::{Arc, Mutex}; +use std::sync::{Arc, Mutex, OnceLock}; use std::time::Duration; use sysinfo::{Pid, ProcessExt, System, SystemExt}; @@ -36,13 +35,7 @@ struct SetupState { system_session_id: String, } -static TEST_MUTEX: Lazy> = Lazy::new(|| { - Mutex::new(SetupState { - installed: false, - loglines: Arc::new(Mutex::new(HashMap::new())), - system_session_id: "NONE".to_string(), - }) -}); +static TEST_MUTEX: OnceLock> = OnceLock::new(); // The goal of this closure is to allow "wrapping" of anything that might issue // an SQL simple_query or query using either a postgres::Client or @@ -198,14 +191,23 @@ fn format_loglines(session_id: &str, loglines: &LogLines) -> String { fn initialize_test_framework( postgresql_conf: Vec<&'static str>, ) -> eyre::Result<(LogLines, String)> { - let mut state = TEST_MUTEX.lock().unwrap_or_else(|_| { - // This used to immediately throw an std::process::exit(1), but it - // would consume both stdout and stderr, resulting in error messages - // not being displayed unless you were running tests with --nocapture. - panic!( + let mut state = TEST_MUTEX + .get_or_init(|| { + Mutex::new(SetupState { + installed: false, + loglines: Arc::new(Mutex::new(HashMap::new())), + system_session_id: "NONE".to_string(), + }) + }) + .lock() + .unwrap_or_else(|_| { + // This used to immediately throw an std::process::exit(1), but it + // would consume both stdout and stderr, resulting in error messages + // not being displayed unless you were running tests with --nocapture. + panic!( "Could not obtain test mutex. A previous test may have hard-aborted while holding it." ); - }); + }); if !state.installed { shutdown::register_shutdown_hook(); From 01cab136f1960d6ab6c3c9bc60a584de323b7704 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Fri, 26 Jan 2024 14:50:06 -0800 Subject: [PATCH 02/12] Remove once_cell from public reexport --- pgrx/src/lib.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/pgrx/src/lib.rs b/pgrx/src/lib.rs index 0c5e3ad25..c6bd92920 100644 --- a/pgrx/src/lib.rs +++ b/pgrx/src/lib.rs @@ -83,9 +83,6 @@ pub mod varlena; pub mod wrappers; pub mod xid; -#[doc(hidden)] -pub use once_cell; - /// Not ready for public exposure. mod layout; mod ptr; From 50a798ad12acc2840440ed0e918ba9dad3b62671 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 13:04:12 -0800 Subject: [PATCH 03/12] Drop once_cell from cargo-pgrx --- Cargo.lock | 1 - cargo-pgrx/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 02873de06..ef7c2257e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,7 +342,6 @@ dependencies = [ "jobslot", "nix", "object", - "once_cell", "owo-colors", "pgrx-pg-config", "pgrx-sql-entity-graph", diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 27b2a8827..6ed04b846 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -48,7 +48,6 @@ serde_derive = "1.0" serde-xml-rs = "0.6.0" syn = { version = "2.0.18", features = [ "extra-traits", "full", "fold", "parsing" ] } object = "0.32.1" -once_cell = "1.18.0" color-eyre = "0.6.2" tracing = "0.1" tracing-error = "0.2.0" From efb1579877458a69dce1a6273f34dbbc8b9c712a Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 13:24:28 -0800 Subject: [PATCH 04/12] Drop trivial nix usage --- Cargo.lock | 13 +------------ cargo-pgrx/Cargo.toml | 2 +- cargo-pgrx/src/command/init.rs | 5 +++-- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ef7c2257e..06e7bd8c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -340,7 +340,7 @@ dependencies = [ "eyre", "flate2", "jobslot", - "nix", + "libc", "object", "owo-colors", "pgrx-pg-config", @@ -1239,17 +1239,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "libc", -] - [[package]] name = "nom" version = "7.1.3" diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 6ed04b846..306a3d4ca 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -29,6 +29,7 @@ pgrx-sql-entity-graph.workspace = true cargo_toml.workspace = true eyre.workspace = true +libc.workspace = true owo-colors.workspace = true regex.workspace = true unescape.workspace = true @@ -54,7 +55,6 @@ tracing-error = "0.2.0" tracing-subscriber = { version = "0.3.17", features = [ "env-filter" ] } flate2 = { version = "1.0.27", default-features = false, features = ["rust_backend"] } tempfile = "3.8.0" -nix = { version = "0.27", default-features = false, features = ["user"] } toml = "0.8.2" jobslot = "0.2.12" bzip2 = "0.4.4" diff --git a/cargo-pgrx/src/command/init.rs b/cargo-pgrx/src/command/init.rs index fe8ab225b..53b6e73f0 100644 --- a/cargo-pgrx/src/command/init.rs +++ b/cargo-pgrx/src/command/init.rs @@ -590,8 +590,9 @@ fn get_pg_installdir(pgdir: &PathBuf) -> PathBuf { #[cfg(unix)] fn is_root_user() -> bool { - use nix::unistd::Uid; - Uid::effective().is_root() + // SAFETY: No, the `nix` crate does not do anything more clever: + // check if effective user ID is 0, AKA "root" + unsafe { libc::geteuid() == 0 } } /// Incorrectly answers false, reverting pgrx to pre-root-aware behavior, From 8f2311ad5e172aed3753c2078d418e7d4c9d1901 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 13:30:18 -0800 Subject: [PATCH 05/12] Drop syn and prettyplease from cargo-pgrx --- Cargo.lock | 12 ------------ cargo-pgrx/Cargo.toml | 2 -- 2 files changed, 14 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 06e7bd8c6..0121351f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -345,7 +345,6 @@ dependencies = [ "owo-colors", "pgrx-pg-config", "pgrx-sql-entity-graph", - "prettyplease", "proc-macro2", "quote", "regex", @@ -353,7 +352,6 @@ dependencies = [ "serde", "serde-xml-rs", "serde_derive", - "syn 2.0.48", "tar", "tempfile", "toml", @@ -1677,16 +1675,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn 2.0.48", -] - [[package]] name = "proc-macro2" version = "1.0.78" diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 306a3d4ca..02e910925 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -40,14 +40,12 @@ clap = { version = "4.4.2", features = [ "env", "suggestions", "cargo", "derive" clap-cargo = { version = "0.11.0", features = [ "cargo_metadata" ] } semver = "1.0.20" env_proxy = "0.4.1" -prettyplease = "0.2.15" proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] } quote = "1.0.33" ureq = { version = "2.8.0", default-features = false, features = [ "gzip" ] } serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde-xml-rs = "0.6.0" -syn = { version = "2.0.18", features = [ "extra-traits", "full", "fold", "parsing" ] } object = "0.32.1" color-eyre = "0.6.2" tracing = "0.1" From 2454b833e38a5054ccf5798cca1bd5cbd15feb5b Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 13:40:10 -0800 Subject: [PATCH 06/12] Organize download-related deps We should not be using serde_derive directly. --- Cargo.lock | 1 - cargo-pgrx/Cargo.toml | 9 +++++---- cargo-pgrx/src/command/version.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0121351f9..de8b3c6fa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -351,7 +351,6 @@ dependencies = [ "semver 1.0.21", "serde", "serde-xml-rs", - "serde_derive", "tar", "tempfile", "toml", diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 02e910925..652fc45e3 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -42,10 +42,6 @@ semver = "1.0.20" env_proxy = "0.4.1" proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] } quote = "1.0.33" -ureq = { version = "2.8.0", default-features = false, features = [ "gzip" ] } -serde = { version = "1.0", features = [ "derive" ] } -serde_derive = "1.0" -serde-xml-rs = "0.6.0" object = "0.32.1" color-eyre = "0.6.2" tracing = "0.1" @@ -55,8 +51,13 @@ flate2 = { version = "1.0.27", default-features = false, features = ["rust_backe tempfile = "3.8.0" toml = "0.8.2" jobslot = "0.2.12" + +# for downloading/unpacking things from the Postgres file servers bzip2 = "0.4.4" +serde = { version = "1.0", features = [ "derive" ] } +serde-xml-rs = "0.6.0" tar = "0.4.40" +ureq = { version = "2.8.0", default-features = false, features = [ "gzip" ] } [features] default = ["rustls"] diff --git a/cargo-pgrx/src/command/version.rs b/cargo-pgrx/src/command/version.rs index c8a2562ca..4be017fc1 100644 --- a/cargo-pgrx/src/command/version.rs +++ b/cargo-pgrx/src/command/version.rs @@ -23,7 +23,7 @@ mod rss { use eyre::WrapErr; use owo_colors::OwoColorize; use pgrx_pg_config::{PgMinorVersion, PgVersion}; - use serde_derive::Deserialize; + use serde::Deserialize; use std::collections::BTreeMap; use url::Url; From 43fa0854af9a93781e2476c0dd3ee200aa85996c Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 13:56:56 -0800 Subject: [PATCH 07/12] cargo-pgrx: Drop flate2 We no longer use it directly --- Cargo.lock | 1 - cargo-pgrx/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index de8b3c6fa..38dccab12 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -338,7 +338,6 @@ dependencies = [ "color-eyre", "env_proxy", "eyre", - "flate2", "jobslot", "libc", "object", diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 652fc45e3..fca1f3e48 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -47,7 +47,6 @@ color-eyre = "0.6.2" tracing = "0.1" tracing-error = "0.2.0" tracing-subscriber = { version = "0.3.17", features = [ "env-filter" ] } -flate2 = { version = "1.0.27", default-features = false, features = ["rust_backend"] } tempfile = "3.8.0" toml = "0.8.2" jobslot = "0.2.12" From e495b40db4152b2c877f9754816f542788046622 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 13:58:48 -0800 Subject: [PATCH 08/12] Organize diagnostics deps --- cargo-pgrx/Cargo.toml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index fca1f3e48..6749f8f78 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -28,9 +28,7 @@ pgrx-pg-config.workspace = true pgrx-sql-entity-graph.workspace = true cargo_toml.workspace = true -eyre.workspace = true libc.workspace = true -owo-colors.workspace = true regex.workspace = true unescape.workspace = true url.workspace = true @@ -43,13 +41,17 @@ env_proxy = "0.4.1" proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] } quote = "1.0.33" object = "0.32.1" +tempfile = "3.8.0" +toml = "0.8.2" +jobslot = "0.2.12" + +# emit better diagnostics color-eyre = "0.6.2" +eyre.workspace = true +owo-colors.workspace = true tracing = "0.1" tracing-error = "0.2.0" tracing-subscriber = { version = "0.3.17", features = [ "env-filter" ] } -tempfile = "3.8.0" -toml = "0.8.2" -jobslot = "0.2.12" # for downloading/unpacking things from the Postgres file servers bzip2 = "0.4.4" From a54e85f4bda731fc59996e61f80772f58d57e6d7 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 14:03:33 -0800 Subject: [PATCH 09/12] Organize schema-gen dependencies --- cargo-pgrx/Cargo.toml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 6749f8f78..49d06703e 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -38,13 +38,15 @@ clap = { version = "4.4.2", features = [ "env", "suggestions", "cargo", "derive" clap-cargo = { version = "0.11.0", features = [ "cargo_metadata" ] } semver = "1.0.20" env_proxy = "0.4.1" -proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] } -quote = "1.0.33" -object = "0.32.1" tempfile = "3.8.0" toml = "0.8.2" jobslot = "0.2.12" +# SQL schema generation +object = "0.32.1" +proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] } +quote = "1.0.33" + # emit better diagnostics color-eyre = "0.6.2" eyre.workspace = true From e72d88ec1c63c3ae7157a8197691448c3914faf3 Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 14:06:31 -0800 Subject: [PATCH 10/12] Organize remaining cargo-pgrx deps --- cargo-pgrx/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index 49d06703e..c7c204ed6 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -36,11 +36,11 @@ url.workspace = true cargo_metadata = "0.17.0" clap = { version = "4.4.2", features = [ "env", "suggestions", "cargo", "derive", "wrap_help" ] } clap-cargo = { version = "0.11.0", features = [ "cargo_metadata" ] } -semver = "1.0.20" env_proxy = "0.4.1" +jobslot = "0.2.12" # as seen in gmake -j{N} +semver = "1.0.20" # checking pgrx versions match tempfile = "3.8.0" -toml = "0.8.2" -jobslot = "0.2.12" +toml = "0.8.2" # our config files # SQL schema generation object = "0.32.1" From 0df53b000a8a25f7aa8b89a513bef5c85765aeac Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 14:07:55 -0800 Subject: [PATCH 11/12] cargo-pgrx: drop unescape --- Cargo.lock | 1 - cargo-pgrx/Cargo.toml | 1 - pgrx-sql-entity-graph/Cargo.toml | 2 +- 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 38dccab12..768742ae1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -356,7 +356,6 @@ dependencies = [ "tracing", "tracing-error", "tracing-subscriber", - "unescape", "ureq", "url", ] diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index c7c204ed6..fe528df0b 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -30,7 +30,6 @@ pgrx-sql-entity-graph.workspace = true cargo_toml.workspace = true libc.workspace = true regex.workspace = true -unescape.workspace = true url.workspace = true cargo_metadata = "0.17.0" diff --git a/pgrx-sql-entity-graph/Cargo.toml b/pgrx-sql-entity-graph/Cargo.toml index 34e95c52b..95efca4a2 100644 --- a/pgrx-sql-entity-graph/Cargo.toml +++ b/pgrx-sql-entity-graph/Cargo.toml @@ -26,7 +26,6 @@ no-schema-generation = [] [dependencies] eyre.workspace = true -unescape.workspace = true thiserror.workspace = true convert_case = "0.6.0" @@ -34,6 +33,7 @@ petgraph = "0.6.4" proc-macro2 = { version = "1.0.69", features = [ "span-locations" ] } quote = "1.0.33" syn = { version = "1.0.109", features = [ "extra-traits", "full", "fold", "parsing" ] } +unescape = "0.1.0" # for escaped-character-handling # colorized sql output owo-colors = { optional = true, workspace = true } From 797dd940105d034b14f284a5b8ae071abef948df Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 7 Feb 2024 14:09:57 -0800 Subject: [PATCH 12/12] note env_proxy and url are network stuff --- cargo-pgrx/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cargo-pgrx/Cargo.toml b/cargo-pgrx/Cargo.toml index fe528df0b..1e683090b 100644 --- a/cargo-pgrx/Cargo.toml +++ b/cargo-pgrx/Cargo.toml @@ -30,12 +30,10 @@ pgrx-sql-entity-graph.workspace = true cargo_toml.workspace = true libc.workspace = true regex.workspace = true -url.workspace = true cargo_metadata = "0.17.0" clap = { version = "4.4.2", features = [ "env", "suggestions", "cargo", "derive", "wrap_help" ] } clap-cargo = { version = "0.11.0", features = [ "cargo_metadata" ] } -env_proxy = "0.4.1" jobslot = "0.2.12" # as seen in gmake -j{N} semver = "1.0.20" # checking pgrx versions match tempfile = "3.8.0" @@ -56,10 +54,12 @@ tracing-subscriber = { version = "0.3.17", features = [ "env-filter" ] } # for downloading/unpacking things from the Postgres file servers bzip2 = "0.4.4" +env_proxy = "0.4.1" serde = { version = "1.0", features = [ "derive" ] } serde-xml-rs = "0.6.0" tar = "0.4.40" ureq = { version = "2.8.0", default-features = false, features = [ "gzip" ] } +url.workspace = true [features] default = ["rustls"]