pgdd icon indicating copy to clipboard operation
pgdd copied to clipboard

Update to pgrx 0.12.0.alpha.1

Open rustprooflabs opened this issue 1 year ago • 2 comments

Following https://github.com/rustprooflabs/pgfaker/pull/3 and https://github.com/rustprooflabs/convert/pull/9

rustprooflabs avatar Mar 22 '24 00:03 rustprooflabs

Not sure why yet, but cargo pgrx run failed with this error:

   Compiling pgdd v0.5.3-dev.0 (/home/ryanlambert/git/pgdd)
error[E0599]: no function or associated item named `try_from` found for struct `ControlFile` in the current scope
  --> /tmp/.tmpOq8FPl:1:247
   |
1  | ..._entity_graph :: ControlFile :: try_from (control_file_path) . expect (".control file should properly formatted") ; let control_...
   |                                    ^^^^^^^^ function or associated item not found in `ControlFile`
   |
note: if you're trying to build a new `ControlFile`, consider using `ControlFile::from_str` which returns `std::result::Result<ControlFile, pgrx_sql_entity_graph::control_file::ControlFileError>`
  --> /home/ryanlambert/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgrx-sql-entity-graph-0.12.0-alpha.1/src/control_file.rs:71:5
   |
71 |     pub fn from_str(input: &str) -> Result<Self, ControlFileError> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
  --> src/bin/pgrx_embed_pgdd.rs:2:1
   |
2  + use std::convert::TryFrom;
   |

For more information about this error, try `rustc --explain E0599`.
error: could not compile `pgdd` (bin "pgrx_embed_pgdd") due to 1 previous error

rustprooflabs avatar Mar 22 '24 12:03 rustprooflabs

Error fixed. Thank you @usamoi for pointing me at the edition being the problem.

rustprooflabs avatar Mar 23 '24 15:03 rustprooflabs