You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just upgraded to Rust 1.84, blew away my .pgrx directory and redid cargo pgrx init, cargo clean, and then cargo pgrx run. I'm getting the error above. I have version 0.12.9 installed.
To duplicate the error, upgrade Rust as I did, run cargo pgrx new tester, switch to the tester directory, and then cargo pgrx run. I got this output:
ccleve@MacBookPro tester % cargo pgrx run
Using DefaultFeature("pg13") and `pg_config` from /Users/ccleve/.pgrx/13.18/pgrx-install/bin/pg_config
Building extension with features pg13
Running command "/Users/ccleve/.rustup/toolchains/stable-aarch64-apple-darwin/bin/cargo" "build" "--lib" "--features" "pg13" "--no-default-features" "--message-format=json-render-diagnostics"
Compiling proc-macro2 v1.0.93
... bunch of files omitted ...
Compiling pgrx v0.12.9
Compiling tester v0.0.0 (/Users/ccleve/dev/pg/tester)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 28.90s
Installing extension
Copying control file to /Users/ccleve/.pgrx/13.18/pgrx-install/share/postgresql/extension/tester.control
Copying shared library to /Users/ccleve/.pgrx/13.18/pgrx-install/lib/postgresql/tester.so
Discovered 1 SQL entities: 0 schemas (0 unique), 1 functions, 0 types, 0 enums, 0 sqls, 0 ords, 0 hashes, 0 aggregates, 0 triggers
Rebuilding pgrx_embed, in debug mode, for SQL generation with features pg13
Compiling tester v0.0.0 (/Users/ccleve/dev/pg/tester)
warning: unexpected `cfg` condition name: `pgrx_embed`
--> src/bin/pgrx_embed.rs:1:1
|
1 | ::pgrx::pgrx_embed!();
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: expected names are: `clippy`, `debug_assertions`, `doc`, `docsrs`, `doctest`, `feature`, `fmt_debug`, `miri`, `overflow_checks`, `panic`, `proc_macro`, `relocation_model`, `rustfmt`, `sanitize`, `sanitizer_cfi_generalize_pointers`, `sanitizer_cfi_normalize_integers`, `target_abi`, `target_arch`, `target_endian`, `target_env`, `target_family`, `target_feature`, `target_has_atomic`, `target_has_atomic_equal_alignment`, `target_has_atomic_load_store`, `target_os`, `target_pointer_width`, `target_thread_local`, `target_vendor`, `test`, `ub_checks`, `unix`, and `windows`
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(pgrx_embed)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(pgrx_embed)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: `#[warn(unexpected_cfgs)]` on by default
= note: this warning originates in the macro `::pgrx::pgrx_embed` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: unexpected `cfg` condition name: `pgrx_embed`
--> src/bin/pgrx_embed.rs:1:1
|
1 | ::pgrx::pgrx_embed!();
| ^^^^^^^^^^^^^^^^^^^^^
|
= help: consider using a Cargo feature instead
= help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint:
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(pgrx_embed)'] }
= help: or consider adding `println!("cargo::rustc-check-cfg=cfg(pgrx_embed)");` to the top of the `build.rs`
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration
= note: this warning originates in the macro `::pgrx::pgrx_embed` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: `tester` (bin "pgrx_embed_tester") generated 2 warnings
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.35s
Writing SQL entities to /Users/ccleve/.pgrx/13.18/pgrx-install/share/postgresql/extension/tester--0.0.0.sql
Finished installing tester
Starting Postgres v13 on port 28813
Creating database tester
psql (13.18)
Type "help" for help.
tester=#
I took the compiler's suggestion to add the println!() line to build.rs and the problem went away.
I'm wondering if Rust changed something.
The text was updated successfully, but these errors were encountered:
I just upgraded to Rust 1.84, blew away my .pgrx directory and redid
cargo pgrx init
,cargo clean
, and thencargo pgrx run
. I'm getting the error above. I have version 0.12.9 installed.To duplicate the error, upgrade Rust as I did, run
cargo pgrx new tester
, switch to the tester directory, and thencargo pgrx run
. I got this output:I took the compiler's suggestion to add the println!() line to build.rs and the problem went away.
I'm wondering if Rust changed something.
The text was updated successfully, but these errors were encountered: