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

Deprecate pgrx::hooks without replacement #1752

Conversation

workingjubilee
Copy link
Member

Even if we could fix this with internal refactors, I think it's a sufficiently bad pattern, and sufficiently hard to reason about the soundness of it, that we should just tell people to drop this API.

@daamien
Copy link
Contributor

daamien commented Jul 8, 2024

As far as I understand, this is going to break any PGRX extension that defines PostgresQL hooks ? Seems like a radical choice, given that there may be some of these hook-based extensions currently in production... What would be the best approach for them ? Staying in version 0.11 indefinetely with no support for Postgres 17+ or maybe something like #[allow(pgrx::hooks)] ?

@workingjubilee
Copy link
Member Author

@daamien you can just allow(deprecated). warnings don't prevent anything from compiling.

@workingjubilee
Copy link
Member Author

My only hesitation for committing this at the moment is currently I'm also using deprecations to communicate about other things that can be effectively replaced, so I am reluctant to fill the deprecation notices with even more.

@workingjubilee
Copy link
Member Author

I've decided I'm only going to merge this deprecation notice after I cut 0.12.0 proper, as otherwise a bunch of useful deprecation notices will be shadowed by one kinda useless one (I feel the request is a bit unfair, even if it's true it's more sound code).

@workingjubilee workingjubilee force-pushed the deprecate-hooks-api-without-replacement branch from 575dc94 to a217272 Compare August 20, 2024 20:00
@workingjubilee workingjubilee merged commit 1f85733 into pgcentralfoundation:develop Aug 20, 2024
14 checks passed
@workingjubilee workingjubilee deleted the deprecate-hooks-api-without-replacement branch August 20, 2024 20:56
@yrashk
Copy link
Contributor

yrashk commented Sep 19, 2024

To keep some decision-making trail, is it fair to note that #1749 would be a good reference for the problems discussed here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants