Skip to content

Commit db7b09d

Browse files
Release pgrx 0.12.0-alpha.1 (#1598)
Welcome to pgrx 0.12.0-alpha.1! Say the magic words with me! ```shell cargo install cargo-pgrx --locked --version 0.12.0-alpha.1 ``` # Breaking Changes ## No more dlopen! Perhaps the most exciting change this round is @usamoi's contribution in #1468 which means that we no longer perform a `dlopen` in order to generate the schema. The cost, such as it is, is that your pgrx extensions now require a `src/bin/pgrx_embed.rs`, which will be used to generate the schema. This has much less cross-platform issues and will enable supporting things like `cargo binstall` down the line. It may be a bit touchy on first-time setup for transitioning older repos. If necessary, you may have to directly add a `src/bin/pgrx_embed.rs` and add the following code (which should be the only code in the file, though you can add comments if you like?): ```rust ::pgrx::pgrx_embed!(); ``` Your Cargo.toml will also want to update its crate-type key for the library: ```toml [lib] crate-type = ["cdylib", "lib"] ``` ## Library Code - pgrx-pg-sys will now use `ManuallyDropUnion` thanks to @NotGyro in #1547 - VARHDRSZ `const`s are no longer `fn`, thanks to @workingjubilee in #1584 - We no longer have `Interval::is_finite` since #1594 - We translate more `*_tree_walker` functions to the same signature their `*_impl` version in Postgres 16 has: #1596 - Thanks to @eeeebbbbrrrr in #1591 we no longer have the `pg_sql_graph_magic!()` macro, which should help with more things in the future! # What's New We have quite a lot of useful additions to our API: - `SpiClient::prepare_mut` was added thanks to @XeniaLu in #1275 - @usamoi also contributed bindings subscripting code in #1562 - For `#[pg_test]`, you have been able to use `#[should_panic(expected = "string")]` to anticipate a panic that contains that string in that test. For various reasons, `#[pg_test(error = "string")]` is much the same. Now, you can also use `#[pg_test(expected = "string")]`, in the hopes that is easier to stumble across, as of #1570 ## `Result<composite_type!("..."), E>` support - In #1560 @NotGyro contributed support for using `Result<composite_type!("Name"), E>`, as a case that had not been handled before. ## Significantly expanded docs Thanks to @rjuju, @NotGyro, and @workingjubilee, we now have significantly expanded docs for cargo-pgrx and pgrx in general. Some of these are in the API docs on https://docs.rs or the READMEs, but there's also a guide, now! It's not currently published, but is available as an [mdbook](https://github.com/rust-lang/mdBook) in the repo. Some diagnostic information that is also arguably documentation, like comments and the suggestion to `cargo install`, have also been improved, thanks to @workingjubilee in - #1579 - #1573 ## `#[pg_cast]` An experimental macro for a `CREATE CAST` was contributed by @xwkuang5 in #1445! ## Legal Stuff Thanks to @the-kenny in #1490 and @workingjubilee in #1504, it was brought to our attention that some dependencies had unusual legal requirements. So we fixed this with CI! We now check our code included into pgrx-using binaries is MIT/Apache 2.0 licensed, as is common across crates.io, using `cargo deny`!. The build tools will have more flexible legal requirements (partly due to the use of Mozilla Public License code in rustls). # Internal Changes Many internal cleanups were done thanks to - @workingjubilee in too many PRs to count! - @thomcc found a needless condition in #1501 - @nyurik in too many PRs to count! In particular: - we now actually `pfree` our `Array`s we detoasted as-of #1571 - creating a `RawArray` is now low-overhead due to #1587 ## Soundness Fixes We had a number of soundness issues uncovered or have added more tests to catch them. - Bounds-checking debug assertions for array access by @NotGyro in #1514 - Fix unsound `&` and `&mut` in `fcinfo.rs` by @workingjubilee in #1595 ## Less Deps Part of the cleanup by @workingjubilee was reducing the number of deps we compile: * cargo-pgrx: reduce trivial dep usages in #1499 * Update 2 syn in #1557 Hopefully it will reduce compile time and disk usage! ## New Contributors * @the-kenny made their first contribution in #1490 * @xwkuang5 made their first contribution in #1445 * @rjuju made their first contribution in #1516 * @nyurik made their first contribution in #1533 * @NotGyro made their first contribution in #1514 * @XeniaLu made their first contribution in #1275 **Full Changelog**: v0.12.0-alpha.0...v0.12.0-alpha.1
1 parent a644458 commit db7b09d

File tree

22 files changed

+7142
-1643
lines changed

22 files changed

+7142
-1643
lines changed

Cargo.lock

Lines changed: 38 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,22 @@ members = [
5151
cargo-pgrx = { path = "cargo-pgrx" }
5252

5353
[workspace.dependencies]
54-
pgrx-macros = { path = "./pgrx-macros", version = "=0.12.0-alpha.0" }
55-
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.12.0-alpha.0" }
56-
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.12.0-alpha.0" }
57-
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.12.0-alpha.0" }
54+
pgrx-macros = { path = "./pgrx-macros", version = "=0.12.0-alpha.1" }
55+
pgrx-pg-sys = { path = "./pgrx-pg-sys", version = "=0.12.0-alpha.1" }
56+
pgrx-sql-entity-graph = { path = "./pgrx-sql-entity-graph", version = "=0.12.0-alpha.1" }
57+
pgrx-pg-config = { path = "./pgrx-pg-config", version = "=0.12.0-alpha.1" }
5858

59-
cargo_toml = "0.16" # used for building projects
59+
cargo_metadata = "0.18.0"
60+
cargo_toml = "0.19" # used for building projects
61+
clap-cargo = { version = "0.14.0", features = [ "cargo_metadata" ] }
6062
eyre = "0.6.9" # simplifies error-handling
6163
libc = "0.2" # FFI compat
6264
owo-colors = "3.5" # for output highlighting
6365
proc-macro2 = { version = "1.0.78", features = [ "span-locations" ] }
6466
quote = "1.0.33"
6567
regex = "1.1" # used for build/test
6668
syn = { version = "2", features = [ "extra-traits", "full", "parsing" ] }
69+
toml = "0.8" # our config files
6770
thiserror = "1"
6871
unescape = "0.1.0" # for escaped-character-handling
6972
url = "2.4.1" # the non-existent std::web

cargo-pgrx/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "cargo-pgrx"
13-
version = "0.12.0-alpha.0"
13+
version = "0.12.0-alpha.1"
1414
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
1515
license = "MIT"
1616
description = "Cargo subcommand for 'pgrx' to make Postgres extension development easy"
@@ -27,17 +27,17 @@ edition = "2021"
2727
pgrx-pg-config.workspace = true
2828
pgrx-sql-entity-graph.workspace = true
2929

30+
cargo_metadata.workspace = true
3031
cargo_toml.workspace = true
32+
clap-cargo.workspace = true
3133
libc.workspace = true
3234
regex.workspace = true
35+
toml.workspace = true
3336

34-
cargo_metadata = "0.17.0"
3537
clap = { version = "4.4.2", features = [ "env", "suggestions", "cargo", "derive", "wrap_help" ] }
36-
clap-cargo = { version = "0.11.0", features = [ "cargo_metadata" ] }
3738
jobslot = "0.2.12" # as seen in gmake -j{N}
3839
semver = "1.0.20" # checking pgrx versions match
3940
tempfile = "3.8.0"
40-
toml = "0.8.2" # our config files
4141

4242
# SQL schema generation
4343
object = { version = "0.32.1", default-features = false, features = [ "std" ] }

cargo-pgrx/src/templates/cargo_toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]
2020
pg_test = []
2121

2222
[dependencies]
23-
pgrx = "=0.12.0-alpha.0"
23+
pgrx = "=0.12.0-alpha.1"
2424

2525
[dev-dependencies]
26-
pgrx-tests = "=0.12.0-alpha.0"
26+
pgrx-tests = "=0.12.0-alpha.1"
2727

2828
[profile.dev]
2929
panic = "unwind"

nix/templates/default/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ pg16 = ["pgrx/pg16", "pgrx-tests/pg16" ]
2626
pg_test = []
2727

2828
[dependencies]
29-
pgrx = "=0.12.0-alpha.0"
29+
pgrx = "=0.12.0-alpha.1"
3030

3131
[dev-dependencies]
32-
pgrx-tests = "=0.12.0-alpha.0"
32+
pgrx-tests = "=0.12.0-alpha.1"
3333
tempfile = "3.2.0"
3434
once_cell = "1.7.2"
3535

pgrx-macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "pgrx-macros"
13-
version = "0.12.0-alpha.0"
13+
version = "0.12.0-alpha.1"
1414
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
1515
license = "MIT"
1616
description = "Proc Macros for 'pgrx'"

pgrx-pg-config/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "pgrx-pg-config"
13-
version = "0.12.0-alpha.0"
13+
version = "0.12.0-alpha.1"
1414
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
1515
license = "MIT"
1616
description = "A Postgres pg_config wrapper for 'pgrx'"
@@ -27,11 +27,11 @@ cargo_toml.workspace = true
2727
eyre.workspace = true
2828
owo-colors.workspace = true
2929
thiserror.workspace = true
30+
toml.workspace = true
3031
url.workspace = true
3132

3233
home = "0.5.9"
3334
pathsearch = "0.2.0"
3435
serde = { version = "1.0", features = [ "derive" ] }
3536
serde_derive = "1.0"
3637
serde_json = "1.0"
37-
toml = "0.8.2"

pgrx-pg-sys/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
[package]
1212
name = "pgrx-pg-sys"
13-
version = "0.12.0-alpha.0"
13+
version = "0.12.0-alpha.1"
1414
authors = ["PgCentral Foundation, Inc. <[email protected]>"]
1515
license = "MIT"
1616
description = "Generated Rust bindings for Postgres internals, for use with 'pgrx'"

0 commit comments

Comments
 (0)