Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

always compile pgrx_embed_* without opts #1838

Merged

Conversation

eeeebbbbrrrr
Copy link
Contributor

@eeeebbbbrrrr eeeebbbbrrrr commented Sep 3, 2024

This addresses issue #1835 by always compiling the pgrx_embed_xxx binary in debug mode.

Essentially, cargo pgrx now ignores the --release or --profile XXX arguments when compiling the pgrx_embed_xxx binary.

(I am not sure how we can avoid the re-compile completely. My thought was somehow detecting that the contents of the PGRX_EMBED file (which is a temp file generated on every build) haven't actually changed, but I don't know what we'd compare it to?)

Anyways, this PR solves my annoyance and I think it should be sufficient for the OP too.

@workingjubilee
Copy link
Member

(I am not sure how we can avoid the re-compile completely. My thought was somehow detecting that the contents of the PGRX_EMBED file (which is a temp file generated on every build) haven't actually changed, but I don't know what we'd compare it to?)

I believe that it would be possible for cargo to manage this via rust-lang/cargo#6529 but they have so far chosen not to implement that.

@workingjubilee
Copy link
Member

something something filetimes drool content-addressable storage rules
but regardless, this seems fine to me.

@workingjubilee workingjubilee changed the title address issue-1835 always compile pgrx_embed_* without opts Sep 3, 2024
@workingjubilee workingjubilee merged commit 7755cc7 into pgcentralfoundation:develop Sep 3, 2024
14 checks passed
eeeebbbbrrrr added a commit that referenced this pull request Sep 6, 2024
Welcome to pgrx v0.12.2. This is a minor release that fixes a few bugs,
improves compilation times with `cargo pgrx run/install/test`, and adds
a few more Postgres headers.

As usual, please `cargo install cargo-pgrx --version 0.12.2 --locked`.
Then you can run `cargo pgrx upgrade` in your extension crate's root to
update its dependencies.

## What's Changed

* [ `CPPFLAGS`] Switch to `USE_ASSERT_CHECKING` by @SamuelMarks in
#1826
* Add UnboxDatum for Range<T> by @mhov in
#1827
* Moved Sized from FromDatum methods to trait by @YohDeadfall in
#1831
* Used SPI result type for cursor API by @YohDeadfall in
#1836
* always compile `pgrx_embed_*` without opts by @eeeebbbbrrrr in
#1838
* Fixed out of bounds reads for open_cursor by @YohDeadfall in
#1837
* Include `access/visibilitymap.h` and `utils/tuplestore.h` by
@eeeebbbbrrrr in #1841

## New Contributors

Thanks to these folks for their first-time contributions -- it's greatly
appreciated!

* @SamuelMarks made their first contribution in
#1826
* @YohDeadfall made their first contribution in
#1831

**Full Changelog**:
v0.12.1...v0.12.2
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