create-rust-app icon indicating copy to clipboard operation
create-rust-app copied to clipboard

"cargo fullstack" in new project hits dsync.rs compilation errors

Open RobJellinghaus opened this issue 7 months ago • 0 comments

I followed the basic setup, creating a new project named procuretoy. When I run cargo fullstack in the procuretoy directory, I get these errors:

error[E0560]: struct `GenerationConfig<'_>` has no field named `default_table_options`
  --> procuretoy/.cargo/bin/dsync.rs:21:13
   |
21 |             default_table_options: TableOptions::default().tsync().autogenerated_columns(vec![
   |             ^^^^^^^^^^^^^^^^^^^^^ `GenerationConfig<'_>` does not have this field
   |
   = note: available fields are: `options`

error[E0560]: struct `GenerationConfig<'_>` has no field named `table_options`
  --> procuretoy/.cargo/bin/dsync.rs:26:13
   |
26 |             table_options: HashMap::from([
   |             ^^^^^^^^^^^^^ `GenerationConfig<'_>` does not have this field
   |
   = note: available fields are: `options`

error[E0560]: struct `GenerationConfig<'_>` has no field named `model_path`
  --> procuretoy/.cargo/bin/dsync.rs:40:13
   |
40 |             model_path: "crate::models::".to_string(),
   |             ^^^^^^^^^^ `GenerationConfig<'_>` does not have this field
   |
   = note: available fields are: `options`

error[E0560]: struct `GenerationConfig<'_>` has no field named `schema_path`
  --> procuretoy/.cargo/bin/dsync.rs:41:13
   |
41 |             schema_path: "crate::schema::".to_string(),
   |             ^^^^^^^^^^^ `GenerationConfig<'_>` does not have this field
   |
   = note: available fields are: `options`

error[E0308]: arguments to this function are incorrect
   --> procuretoy/.cargo/bin/dsync.rs:16:5
    |
16  |     dsync::generate_files(
    |     ^^^^^^^^^^^^^^^^^^^^^
17  |         schema_file,
    |         ----------- expected `&Path`, found `PathBuf`
18  |         models_dir,
    |         ---------- expected `&Path`, found `PathBuf`
    |
note: function defined here
   --> /Users/robjell/Dev/Rust/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/dsync-0.1.0/src/lib.rs:110:8
    |
110 | pub fn generate_files(
    |        ^^^^^^^^^^^^^^
help: consider borrowing here
    |
17  |         &schema_file,
    |         +
help: consider borrowing here
    |
18  |         &models_dir,
    |         +

Some errors have detailed explanations: E0308, E0560.
For more information about an error, try `rustc --explain E0308`.
error: could not compile `procuretoy` (bin "fullstack") due to 5 previous errors

It's odd that it looks like the dsync crate's version hasn't changed. I tried running cargo fullstack --locked but it failed, saying that updating the lock file was required. I have Rust 1.87 installed locally (current stable).

RobJellinghaus avatar May 26 '25 21:05 RobJellinghaus