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

Filter all to both config && Cargo .tomls #1487

Merged
merged 5 commits into from
Jan 23, 2024

Conversation

workingjubilee
Copy link
Member

@workingjubilee workingjubilee commented Jan 23, 2024

Our support for a given Postgres version, for an extension crate, is informed by two things:

  • The setting to find pg_configs, defaulting to "${PGRX_HOME}/config.toml"
  • The crate's Cargo.toml for a given pgrx "pg{major}" feature.

Interpret cargo-pgrx {start,stop,test} all to act only on versions for which both of these are present. We will simply filter silently without note because there are some nuances for when we should (not) emit errors that I am not entirely settled on how to decide, but ultimately this allows e.g. an extension like PL/Rust that never supported the same version minimum as pgrx to still use cargo pgrx test all, and causes less confusing errors when config.toml includes out-of-date versions unless those are also in Cargo.toml.

Note this doesn't prevent us from emitting errors: instead the error moves to when building the pgrx library. Currently it is first caught by cargo when the extension's Cargo.toml doesn't include the features to for the request from cargo-pgrx, but this is a hidden behavior of cargo-pgrx. The failed build of the library is easier to diagnose.

Closes #1421

Copy link
Contributor

@eeeebbbbrrrr eeeebbbbrrrr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@workingjubilee workingjubilee merged commit 70cab89 into develop Jan 23, 2024
8 checks passed
@workingjubilee workingjubilee deleted the support-unsupported-versions-being-present branch January 24, 2024 19:47
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.

unsupported pg version in ~/.pgrx/config.toml isn't handled
2 participants