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

Can't build #3

Closed
dvv opened this issue Dec 16, 2022 · 1 comment
Closed

Can't build #3

dvv opened this issue Dec 16, 2022 · 1 comment

Comments

@dvv
Copy link

dvv commented Dec 16, 2022

Could you please update the package to be built with cargo 0.6.1 and pg15?
TIA

@dvv
Copy link
Author

dvv commented Dec 16, 2022

So far am getting:

postgres@8906faf9cf1d:~/pgx_json_schema$ cargo pgx package
    Building extension with features
     Running command "cargo" "build" "--release" "--message-format=json-render-diagnostics"
   Compiling pgx_json_schema v0.2.2 (/var/lib/postgresql/pgx_json_schema)
error: custom attribute panicked
 --> src/json_schema.rs:9:1
  |
9 | #[pg_extern]
  | ^^^^^^^^^^^^
  |
  = help: message: called `Result::unwrap()` on an `Err` value: Error("Got unknown return type: ImplTrait(TypeImplTrait { impl_token: Impl, bounds: [Trait(TraitBound { paren_
token: None, modifier: None, lifetimes: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: \"std\", span: #0 bytes(3595..3598) }, argument
s: None }, Colon2, PathSegment { ident: Ident { ident: \"iter\", span: #0 bytes(3600..3604) }, arguments: None }, Colon2, PathSegment { ident: Ident { ident: \"Iterator\", sp
an: #0 bytes(3606..3614) }, arguments: AngleBracketed(AngleBracketedGenericArguments { colon2_token: None, lt_token: Lt, args: [Binding(Binding { ident: Ident { ident: \"Item
\", span: #0 bytes(3620..3624) }, eq_token: Eq, ty: Tuple(TypeTuple { paren_token: Paren, elems: [Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [
PathSegment { ident: Ident { ident: \"name\", span: #0 bytes(3637..3641) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { iden
t: \"error_value\", span: #0 bytes(3643..3654) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(3654..3655) }, Ident { ident: \"JsonB\", span: #0 bytes(3656..3661) }] } }),
 Comma, Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: \"name\", span: #0 bytes(3672..3676) }, arguments: Non
e }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { ident: \"description\", span: #0 bytes(3678..3689) }, Punct { ch: ',', spacing: Alone, span: #
0 bytes(3689..3690) }, Ident { ident: \"String\", span: #0 bytes(3691..3697) }] } }), Comma, Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathS
egment { ident: Ident { ident: \"name\", span: #0 bytes(3708..3712) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { ident: \"
details\", span: #0 bytes(3714..3721) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(3721..3722) }, Ident { ident: \"String\", span: #0 bytes(3723..3729) }] } }), Comma,
Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: \"name\", span: #0 bytes(3740..3744) }, arguments: None }] },
bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { ident: \"instance_path\", span: #0 bytes(3746..3759) }, Punct { ch: ',', spacing: Alone, span: #0 byte
s(3759..3760) }, Ident { ident: \"String\", span: #0 bytes(3761..3767) }] } }), Comma, Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment
 { ident: Ident { ident: \"name\", span: #0 bytes(3778..3782) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { ident: \"schema
_path\", span: #0 bytes(3784..3795) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(3795..3796) }, Ident { ident: \"String\", span: #0 bytes(3797..3803) }] } }), Comma] })
 }), Comma], gt_token: Gt }) }] } })] })")

error: custom attribute panicked
  --> src/json_type_def.rs:13:1
   |
13 | #[pg_extern]
   | ^^^^^^^^^^^^
   |
   = help: message: called `Result::unwrap()` on an `Err` value: Error("Got unknown return type: ImplTrait(TypeImplTrait { impl_token: Impl, bounds: [Trait(TraitBound { paren_token: None, modifier: None, lifetimes: None, path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: \"std\", span: #0 bytes(5601..5604) }, arguments: None }, Colon2, PathSegment { ident: Ident { ident: \"iter\", span: #0 bytes(5606..5610) }, arguments: None }, Colon2, PathSegment { ident: Ident { ident: \"Iterator\", span: #0 bytes(5612..5620) }, arguments: AngleBracketed(AngleBracketedGenericArguments { colon2_token: None, lt_token: Lt, args: [Binding(Binding { ident: Ident { ident: \"Item\", span: #0 bytes(5621..5625) }, eq_token: Eq, ty: Tuple(TypeTuple { paren_token: Paren, elems: [Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: \"name\", span: #0 bytes(5629..5633) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { ident: \"instance_path\", span: #0 bytes(5635..5648) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(5648..5649) }, Ident { ident: \"String\", span: #0 bytes(5650..5656) }] } }), Comma, Macro(TypeMacro { mac: Macro { path: Path { leading_colon: None, segments: [PathSegment { ident: Ident { ident: \"name\", span: #0 bytes(5659..5663) }, arguments: None }] }, bang_token: Bang, delimiter: Paren(Paren), tokens: TokenStream [Ident { ident: \"schema_path\", span: #0 bytes(5665..5676) }, Punct { ch: ',', spacing: Alone, span: #0 bytes(5676..5677) }, Ident { ident: \"String\", span: #0 bytes(5678..5684) }] } })] }) })], gt_token: Gt }) }] } })] })")

warning: unused import: `jsonschema::JSONSchema`
 --> src/json_schema.rs:1:5
  |
1 | use jsonschema::JSONSchema;
  |     ^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `pgx_json_schema` (lib) generated 1 warning
error: could not compile `pgx_json_schema` due to 2 previous errors; 1 warning emitted

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

No branches or pull requests

1 participant