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

build.rs requires $PGRX_HOME/config.toml when it doesn't need to #1111

Closed
eeeebbbbrrrr opened this issue Apr 18, 2023 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@eeeebbbbrrrr
Copy link
Contributor

eeeebbbbrrrr commented Apr 18, 2023

build.rs supports reading the variables pg_config provides from the environment, and in this case it never needs to execute pg_config, which also means that in this case it doesn't need to know where pg_config is on disk. Which means in this case we don't require $PGRX_HOME/config.toml.

Unfortunately, build.rs blindly tries to open $PGRX_HOME/config.toml no matter what.

A downstream effect of this is that an installed PL/Rust extension requires that file during CREATE FUNCTION and it shouldn't.

@eeeebbbbrrrr eeeebbbbrrrr self-assigned this Apr 18, 2023
@eeeebbbbrrrr eeeebbbbrrrr added the bug Something isn't working label Apr 18, 2023
@eeeebbbbrrrr
Copy link
Contributor Author

#1112 is the fix for this

eeeebbbbrrrr added a commit that referenced this issue Apr 20, 2023
* `Pgrx::home()`, the static function that figures out the path for $PGX_HOME, should not also be creating that path.

* do a better job tracking environment variables that are used

* don't try to read `$PGRX_HOME/config.toml` if we don't need to.


Co-authored-by: Jubilee <[email protected]>
This was referenced Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant