-
-
Notifications
You must be signed in to change notification settings - Fork 249
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
v0.12.0-beta.2 Causes Warnings while running Tests #1774
Comments
Sad to see this still in v0.12.1:
You can replicate it thusly: git clone https://github.com/tembo-io/pg-jsonschema-boon.git
cd pg-jsonschema-boon
make test |
This is going to be a little confusing, so bear with me. Your It is only the You could split the EDIT: #[cfg(test)]
use std::err::Error; |
Oooh! So weird it didn't happen in v0.11.x… I'll take look, thanks. |
hmm. I can't answer that. Lots of little bits and bobs have changed between then and now. |
Okay, that worked, but it took some fiddling. Looks like |
Hmm. <thinking...> Yes, I think that's true as the test runner issues sql like |
Since they compile separately, different dependencies can lead to warnings (see pgcentralfoundation/pgrx#1774 for details). So move shared functions to a new `test_util` module, keep the Rust-only tests in `mod test`, and keep the pgrx tests in `mod tests`. I wish I could put the pgrx tests in the required `pg_test` schema, but it appears that they require that the module be named "tests". Thanks @eeeebbbbrrrr for suggesting this solution.
Fixed in tembo-io/pg-jsonschema-boon#5. |
Would it make sense to add a feature parameter with the name? Better to parse it, but perhaps a useable workaround? |
I don’t even know. I’ve never put any thought into it beyond the hardcoded value. |
See, for example, this build, which outputs a couple of these:
Note that std::error::Error is used in the module and
cargo fix --lib -p jsonschema
makes no changes. I'm not sure why it thinkspg_schema
is unused.Do I need to put pgrx tests in a module separate from regular Rust tests, perhaps?
Potentially related: #1631
The text was updated successfully, but these errors were encountered: