Skip to content

Cannot compile project with only bundled and theseus features and problem with not working bundled feature #204

@qarmin

Description

@qarmin

What steps will reproduce the bug? (please provide code snippet if relevant)

  1. Create project with this Cargo.toml
[package]
name = "testy"
version = "0.1.0"
edition = "2021"

[dependencies]
postgresql_embedded = { version = "0.19.0", default-features = false, features = ["bundled", "theseus"] }
  1. main.rs
use postgresql_embedded::{PostgreSQL, Settings};

fn main() {
    let settings = Settings::default();
    PostgreSQL::new(settings);
}
  1. cargo check and cargo check --release fails with info
error: failed to run custom build command for `postgresql_embedded v0.19.0`

Caused by:
  process didn't exit successfully: `/home/rafal/Projekty/Rust/testy/target/debug/build/postgresql_embedded-4d48584269edc5ea/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=POSTGRESQL_VERSION
  cargo:rerun-if-env-changed=POSTGRESQL_RELEASES_URL
  PostgreSQL releases URL: https://github.com/theseus-rs/postgresql-binaries
  PostgreSQL version: *
  Target: x86_64-unknown-linux-gnu
  OUT_DIR: "/home/rafal/Projekty/Rust/testy/target/debug/build/postgresql_embedded-853cd20f71f72aa2/out"

  --- stderr
  Error: Request failed after 3 retries

Enabling the rustls feature fixes the problem, but I don't want to use this feature.
It seems that even with the bundled feature enabled, PostgreSQL.setup() still tries to download images from the internet.
(This might be our fault because maybe we download a different version than the one used at runtime — but still, internet access should be disabled when the bundled feature is enabled)

Maybe rustls and native-tls should be split into separate build-time and runtime(rustls-build, rustls-runtime, native-tls-build, native-tls-runtime) features to avoid such situations.

Information about your environment

  • postgresql_embedded version: 0.19.0
  • Database version: 17.5
  • Operating system: Ubuntu 24.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions