Skip to content

Commit

Permalink
Release v0.1.21 (#133)
Browse files Browse the repository at this point in the history
* update version in cargo-pgx' cargo_toml template

* cargo-pgx command output needs an additional space for padding/alignment

* upgrade dependencies

* fix binding function name warnings, revert hash32 dep to 0.1.1, update rust bindings as built on mac

Co-authored-by: Eric B. Ridge <[email protected]>
  • Loading branch information
Hoverbear and eeeebbbbrrrr authored May 1, 2021
1 parent 2b27faa commit e12d8e8
Show file tree
Hide file tree
Showing 25 changed files with 181 additions and 319 deletions.
284 changes: 112 additions & 172 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgx-parent"
version = "0.1.20"
version = "0.1.21"
authors = ["ZomboDB, LLC <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down
8 changes: 4 additions & 4 deletions cargo-pgx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cargo-pgx"
version = "0.1.20"
version = "0.1.21"
authors = ["ZomboDB, LLC <[email protected]>"]
edition = "2018"
license = "MIT"
Expand All @@ -19,12 +19,12 @@ clap = { version = "2.33.3", features = [ "yaml" ] }
colored = "2.0.0"
env_proxy = "0.4.1"
num_cpus = "1.13.0"
pgx-utils = { path = "../pgx-utils", version = "0.1.20"}
pgx-utils = { path = "../pgx-utils", version = "0.1.21"}
proc-macro2 = { version = "1.0.26", features = [ "span-locations" ] }
quote = "1.0.9"
rayon = "1.5.0"
regex = "1.4.5"
regex = "1.5.2"
rttp_client = { version = "0.1.0", features = ["tls-native"] }
syn = { version = "1.0.69", features = [ "extra-traits", "full", "fold", "parsing" ] }
syn = { version = "1.0.71", features = [ "extra-traits", "full", "fold", "parsing" ] }
unescape = "0.1.0"
fork = "0.1.18"
6 changes: 3 additions & 3 deletions cargo-pgx/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

rustPlatform.buildRustPackage rec {
pname = "cargo-pgx";
version = "0.1.20";
version = "0.1.21";

src = ../.;

#cargoSha256 = lib.fakeSha256;
cargoSha256 = "l/IJ8IjXPoPVnIJojA4i9wLtSqfWHT5OqpdvyK11OAg=";
cargoSha256 = "hKpqdvPEyBnfcjA98wQWgJyEZEf3eaaEi99nB/e7+ck=";
cargoBuildFlags = [ "--package" "cargo-pgx" ];
cargoCheckFlags = [ "--package" "cargo-pgx" ];
cargoTestFlags = [ "--package" "cargo-pgx" ];
Expand Down Expand Up @@ -37,7 +37,7 @@ rustPlatform.buildRustPackage rec {
openssl
];

LIBCLANG_PATH="${llvmPackages.libclang}/lib";
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";

meta = with lib; {
description = "Build PostgreSQL extensions with Rust.";
Expand Down
2 changes: 1 addition & 1 deletion cargo-pgx/src/commands/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub(crate) fn connect_psql(pg_config: &PgConfig, dbname: &str) -> Result<(), std
if !createdb(pg_config, dbname, false, true)? {
println!(
"{} existing database {}",
" Re-using".bold().cyan(),
" Re-using".bold().cyan(),
dbname
);
}
Expand Down
14 changes: 7 additions & 7 deletions cargo-pgx/src/commands/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ pub(crate) fn init_pgx(pgx: &Pgx) -> std::result::Result<(), std::io::Error> {
fn download_postgres(pg_config: &PgConfig, pgxdir: &PathBuf) -> Result<PgConfig, std::io::Error> {
println!(
"{} Postgres v{}.{} from {}",
" Downloading".bold().green(),
" Downloading".bold().green(),
pg_config.major_version()?,
pg_config.minor_version()?,
pg_config.url().expect("no url"),
Expand Down Expand Up @@ -127,14 +127,14 @@ fn untar(bytes: &[u8], pgxdir: &PathBuf, pg_config: &PgConfig) -> Result<PathBuf
));
if pgdir.exists() {
// delete everything at this path if it already exists
println!("{} {}", " Removing".bold().green(), pgdir.display());
println!("{} {}", " Removing".bold().green(), pgdir.display());
std::fs::remove_dir_all(&pgdir)?;
}
std::fs::create_dir_all(&pgdir)?;

println!(
"{} Postgres v{}.{} to {}",
" Untarring".bold().green(),
" Untarring".bold().green(),
pg_config.major_version()?,
pg_config.minor_version()?,
pgdir.display()
Expand Down Expand Up @@ -168,7 +168,7 @@ fn untar(bytes: &[u8], pgxdir: &PathBuf, pg_config: &PgConfig) -> Result<PathBuf
fn configure_postgres(pg_config: &PgConfig, pgdir: &PathBuf) -> Result<(), std::io::Error> {
println!(
"{} Postgres v{}.{}",
" Configuring".bold().green(),
" Configuring".bold().green(),
pg_config.major_version()?,
pg_config.minor_version()?
);
Expand Down Expand Up @@ -213,7 +213,7 @@ fn make_postgres(pg_config: &PgConfig, pgdir: &PathBuf) -> Result<(), std::io::E
let num_cpus = 1.max(num_cpus::get() / 3);
println!(
"{} Postgres v{}.{}",
" Compiling".bold().green(),
" Compiling".bold().green(),
pg_config.major_version()?,
pg_config.minor_version()?
);
Expand Down Expand Up @@ -253,7 +253,7 @@ fn make_postgres(pg_config: &PgConfig, pgdir: &PathBuf) -> Result<(), std::io::E
fn make_install_postgres(version: &PgConfig, pgdir: &PathBuf) -> Result<PgConfig, std::io::Error> {
println!(
"{} Postgres v{}.{} to {}",
" Installing".bold().green(),
" Installing".bold().green(),
version.major_version()?,
version.minor_version()?,
get_pg_installdir(pgdir).display()
Expand Down Expand Up @@ -295,7 +295,7 @@ fn make_install_postgres(version: &PgConfig, pgdir: &PathBuf) -> Result<PgConfig
fn validate_pg_config(pg_config: &PgConfig) -> Result<(), std::io::Error> {
println!(
"{} {}",
" Validating".bold().green(),
" Validating".bold().green(),
pg_config.path().expect("no path for pg_config").display()
);

Expand Down
6 changes: 3 additions & 3 deletions cargo-pgx/src/commands/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub(crate) fn install_extension(

copy_sql_files(&extdir, &extname, &base_directory);

println!("{} installing {}", " Finished".bold().green(), extname);
println!("{} installing {}", " Finished".bold().green(), extname);
Ok(())
}

Expand All @@ -76,7 +76,7 @@ fn copy_file(src: PathBuf, dest: PathBuf, msg: &str) {

println!(
"{} {} to `{}`",
" Copying".bold().green(),
" Copying".bold().green(),
msg,
format_display_path(&dest)
);
Expand Down Expand Up @@ -140,7 +140,7 @@ pub(crate) fn write_full_schema_file(dir: &PathBuf, extdir: Option<&PathBuf>) {
let mut sql = std::fs::File::create(&target_filename).unwrap();
println!(
"{} extension schema to `{}`",
" Writing".bold().green(),
" Writing".bold().green(),
format_display_path(&target_filename)
);

Expand Down
2 changes: 1 addition & 1 deletion cargo-pgx/src/commands/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub(crate) fn run_psql(
if !createdb(pg_config, dbname, false, true)? {
println!(
"{} existing database {}",
" Re-using".bold().cyan(),
" Re-using".bold().cyan(),
dbname
);
}
Expand Down
2 changes: 1 addition & 1 deletion cargo-pgx/src/commands/start.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub(crate) fn start_postgres(pg_config: &PgConfig) -> Result<(), std::io::Error>

println!(
"{} Postgres v{} on port {}",
" Starting".bold().green(),
" Starting".bold().green(),
pg_config.major_version()?,
port.to_string().bold().cyan()
);
Expand Down
2 changes: 1 addition & 1 deletion cargo-pgx/src/commands/stop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub(crate) fn stop_postgres(pg_config: &PgConfig) -> Result<(), std::io::Error>

println!(
"{} Postgres v{}",
" Stopping".bold().green(),
" Stopping".bold().green(),
pg_config.major_version()?
);

Expand Down
6 changes: 3 additions & 3 deletions cargo-pgx/src/templates/cargo_toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ pg13 = ["pgx/pg13", "pgx-tests/pg13" ]
pg_test = []

[dependencies]
pgx = "0.1.20"
pgx-macros = "0.1.20"
pgx = "0.1.21"
pgx-macros = "0.1.21"

[dev-dependencies]
pgx-tests = "0.1.20"
pgx-tests = "0.1.21"

[profile.dev]
panic = "unwind"
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
nixpkgs-fmt
cargo-pgx
];
LIBCLANG_PATH="${pkgs.llvmPackages.libclang}/lib";
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang}/lib";
});

checks = forAllSystems (system:
Expand Down
6 changes: 3 additions & 3 deletions pgx-macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgx-macros"
version = "0.1.20"
version = "0.1.21"
authors = ["ZomboDB, LLC <[email protected]>"]
edition = "2018"
license = "MIT"
Expand All @@ -14,8 +14,8 @@ readme = "README.md"
proc-macro = true

[dependencies]
pgx-utils = { path = "../pgx-utils", version = "0.1.20"}
pgx-utils = { path = "../pgx-utils", version = "0.1.21"}
proc-macro2 = "1.0.26"
quote = "1.0.9"
syn = { version = "1.0.69", features = [ "extra-traits", "full", "fold", "parsing" ] }
syn = { version = "1.0.71", features = [ "extra-traits", "full", "fold", "parsing" ] }
unescape = "0.1.0"
14 changes: 7 additions & 7 deletions pgx-pg-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pgx-pg-sys"
version = "0.1.20"
version = "0.1.21"
authors = ["ZomboDB, LLC <[email protected]>"]
edition = "2018"
license = "MIT"
Expand All @@ -23,17 +23,17 @@ no-default-features = true
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
memoffset = "0.6.1"
memoffset = "0.6.3"
once_cell = "1.7.2"
pgx-macros = { path = "../pgx-macros/", version = "0.1.20"}
pgx-macros = { path = "../pgx-macros/", version = "0.1.21"}

[build-dependencies]
bindgen = "0.57.0"
bindgen = "0.58.1"
build-deps = "0.1.4"
colored = "2.0.0"
num_cpus = "1.13.0"
pgx-utils = { path = "../pgx-utils/", version = "0.1.20"}
proc-macro2 = "1.0.24"
pgx-utils = { path = "../pgx-utils/", version = "0.1.21"}
proc-macro2 = "1.0.26"
quote = "1.0.9"
rayon = "1.5.0"
syn = { version = "1.0.64", features = [ "extra-traits", "full", "fold", "parsing" ] }
syn = { version = "1.0.71", features = [ "extra-traits", "full", "fold", "parsing" ] }
12 changes: 6 additions & 6 deletions pgx-pg-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -464,12 +464,12 @@ fn run_bindgen(
.header(include_h.display().to_string())
.clang_arg(&format!("-I{}", includedir_server.display()))
.parse_callbacks(Box::new(IgnoredMacros::default()))
.blacklist_function("varsize_any") // pgx converts the VARSIZE_ANY macro, so we don't want to also have this function, which is in heaptuple.c
.blacklist_function("query_tree_walker")
.blacklist_function("expression_tree_walker")
.blacklist_function("sigsetjmp")
.blacklist_function("siglongjmp")
.blacklist_function("pg_re_throw")
.blocklist_function("varsize_any") // pgx converts the VARSIZE_ANY macro, so we don't want to also have this function, which is in heaptuple.c
.blocklist_function("query_tree_walker")
.blocklist_function("expression_tree_walker")
.blocklist_function("sigsetjmp")
.blocklist_function("siglongjmp")
.blocklist_function("pg_re_throw")
.size_t_is_usize(true)
.rustfmt_bindings(false)
.derive_debug(true)
Expand Down
Loading

0 comments on commit e12d8e8

Please sign in to comment.