-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Optionally emit versioned .so #546
Optionally emit versioned .so #546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think overall this is pretty close.
Before merging, I'd like to see the cargo-pgx/README.md
updated to reflect this new argument and detail what it does any why it might be necessary.
590bc12
to
6cebc4e
Compare
I've updated the docs. I'm having difficulty seeing where somebody who is unfamiliar with these concepts will have difficulty, so if there's anything that you find unclear please let me know and I'll take another pass. |
3ae2ff9
to
f62db52
Compare
f62db52
to
4e440f1
Compare
@JamesGuthrie this is super nice now. Great work and thanks for sticking through the process. When you address those three minor comments above this will be ready to merge. Oh, please retarget the PR to the |
4e440f1
to
f33c9ae
Compare
No problem, thanks for the quick review! I've fixed the three things above and retargeted against develop. |
Approved. Lets see what CI says and then I'll merge it. And as promised, I'm happy to put out a v0.4.4 this week so y'all can get back to your real work. |
hmm, the new Error message sucks. Did it work for you locally? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some minor readme expansions requested, but otherwise I'm happy with how this turned out!
`pgx` now experimentally supports the option to produce a versioned shared library. This option is activated by removing the `module_pathname` parameter in the extension's `.control` file. When activated, it does the following: - appends current package version to shared library name - points generated function SQL to the versioned shared library (instead of `MODULE_PATHNAME`) - replaces `@MODULE_PATHNAME@` placeholder with the path to the versioned shared library Background: There is an implicit requirement that C extensions maintain ABI compatibility between versions. Emitting a versioned .so allows for ABI breaks between versions. This functionality is experimental and that care must be taken in the following scenarios: - when using shared memory - when using query planner hooks - when producing SQL schema migrations
f33c9ae
to
132e83d
Compare
Okay, managed to get the build to work locally. Let's hope that CI accepts it. |
This is great James. :) |
Thanks a bunch, @JamesGuthrie! Merged. We'll get it out in a new release in the next few days. |
@@ -0,0 +1,3 @@ | |||
[build] | |||
# Postgres symbols won't be available until runtime | |||
rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We didn't catch this during review, but this should have been removed as it causes some conflicts with the workspace override. @eeeebbbbrrrr is fixing this up before release.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah. totally our bad.
In a workspace crate environment like pgx is, you only need the .cargo/config
at the root workspace crate. If it's in any "child" crates, the compiler goes stupid and you spend all day trying to figure it out and then you're thankful @Hoverbear is on your team!
pgx
now experimentally supports the option to produce a versionedshared library. This option is activated by removing the
module_pathname
parameter in the extension's.control
file.When activated, it does the following:
of
MODULE_PATHNAME
)@MODULE_PATHNAME@
placeholder with the path to the versionedshared library
Background:
There is an implicit requirement that C extensions maintain ABI
compatibility between versions. Emitting a versioned .so allows for ABI
breaks between versions.
This functionality is experimental and that care must be taken in the
following scenarios: