pq-sys icon indicating copy to clipboard operation
pq-sys copied to clipboard

Consider making pkg-config unconditional

Open sternenseemann opened this issue 9 months ago • 1 comments
trafficstars

pkg-config is very robust and useful for locating libpq and sometimes preferrable to pg_config (e.g. in a cross context). However, since the pkg-config support in build.rs is gated behind a feature, indirect dependents on pq-sys (i.e. most users of pq-sys) can't directly influence this due to https://github.com/rust-lang/cargo/issues/8413.

You can work around this by adding a bogus dependency on pq-sys in your project's Cargo.toml, setting the flag, but this does not feel quite right (and I'm not certain that cargo couldn't misbehave here…).

sternenseemann avatar Feb 15 '25 18:02 sternenseemann

You can work around this by adding a bogus dependency on pq-sys in your project's Cargo.toml, setting the flag, but this does not feel quite right

To be clear here: That's the expected way to enable these features.

That written: I think its reasonable to enable this feature by default. I'm happy to accept a PR for that.

weiznich avatar Feb 20 '25 07:02 weiznich

Fixed with https://github.com/sgrif/pq-sys/commit/1ec8dae95300bc977d18558db2f13e55a1c8ed87

weiznich avatar Oct 01 '25 14:10 weiznich