Skip to content

Conversation

samrose
Copy link
Collaborator

@samrose samrose commented Oct 23, 2024

What kind of change does this PR introduce?

The original error

error: A hash was specified for clickhouse-rs-1.0.0-alpha.1, but there is no corresponding git dependency.

was resolved by

  cargoLock = {
    lockFile = "${src}/Cargo.lock";
    allowBuiltinFetchGit = true;
  };

The newer version of the buildPgxExtension was able just to use the lockfile and the builtin fetch git capability.

In addition I added env vars for building on macOS

  env = lib.optionalAttrs stdenv.isDarwin {
    POSTGRES_LIB = "${postgresql}/lib";
    RUSTFLAGS = "-C link-arg=-undefined -C link-arg=dynamic_lookup";
    PGPORT = "5435";
  };

These weren't needed with the previous version of cargo-pgrx builder, but they are now. Similar to what we have here https://github.com/supabase/wrappers/blob/v0.4.3/.cargo/config.toml gave PGPORT a unique number which helps tests pass and avoid collisions.

I also bumped up the version of rust in the packages to 1.80.0 which

Added NIX_LDFLAGS = "-L${postgresql}/lib -lpq"; for when linking, to look in PostgreSQL's lib directory and link against the PostgreSQL client library

@samrose samrose requested a review from a team as a code owner October 23, 2024 03:29
@samrose samrose requested a review from burmecia October 23, 2024 03:55
@burmecia burmecia merged commit 68d6ca9 into bo/chore/wrappers-0.4.3 Oct 23, 2024
6 of 10 checks passed
@burmecia burmecia deleted the sam/wrappers-pgrx-0-12-6 branch October 23, 2024 05:47
burmecia added a commit that referenced this pull request Oct 24, 2024
* chore: bump wrappers to v0.4.3

* fix: pkg changes for wrappers using cargo-pgrx 0.12.6 (#1288)

* fix: pkg changes for wrappers using cargo-pgrx 0.12.6

* chore: cleanup

---------

Co-authored-by: Sam Rose <[email protected]>

---------

Co-authored-by: samrose <[email protected]>
Co-authored-by: Sam Rose <[email protected]>
damonrand pushed a commit to cepro/postgres that referenced this pull request Jun 15, 2025
* chore: bump wrappers to v0.4.3

* fix: pkg changes for wrappers using cargo-pgrx 0.12.6 (supabase#1288)

* fix: pkg changes for wrappers using cargo-pgrx 0.12.6

* chore: cleanup

---------

Co-authored-by: Sam Rose <[email protected]>

---------

Co-authored-by: samrose <[email protected]>
Co-authored-by: Sam Rose <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants