rust-weechat icon indicating copy to clipboard operation
rust-weechat copied to clipboard

error[E0609]: no field `printf_date_tags` on type `&t_weechat_plugin`; rust-weechat won't build at all

Open yalla opened this issue 2 years ago • 0 comments

The rust version on my Fedora changed again, so I had to rebuild weechat-matrix-rs, but this time it was rust-weechat refusing to build.

Symptoms: When doing a cargo build in a fresh weechat-matrix-rs git checkout, the following errors show up and rust-weechat and therefore weechat-matrix-rs don't build:

...
   Compiling tokio-socks v0.5.1
   Compiling futures v0.3.24
   Compiling weechat v0.4.0 (https://github.com/poljar/rust-weechat#8209460a)
error[E0609]: no field `printf_date_tags` on type `&t_weechat_plugin`
   --> /home/alex/.cargo/git/checkouts/rust-weechat-4239b35d876f5f87/8209460/weechat/src/weechat.rs:286:46
    |
286 |         let printf_date_tags = weechat.get().printf_date_tags.unwrap();
    |                                              ^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `printf_datetime_tags`

error[E0609]: no field `printf_date_tags` on type `&t_weechat_plugin`
   --> /home/alex/.cargo/git/checkouts/rust-weechat-4239b35d876f5f87/8209460/weechat/src/buffer/mod.rs:774:46
    |
774 |         let printf_date_tags = weechat.get().printf_date_tags.unwrap();
    |                                              ^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `printf_datetime_tags`

error[E0609]: no field `printf_date_tags` on type `&t_weechat_plugin`
   --> /home/alex/.cargo/git/checkouts/rust-weechat-4239b35d876f5f87/8209460/weechat/src/buffer/mod.rs:802:46
    |
802 |         let printf_date_tags = weechat.get().printf_date_tags.unwrap();
    |                                              ^^^^^^^^^^^^^^^^ help: a field with a similar name exists: `printf_datetime_tags`

For more information about this error, try `rustc --explain E0609`.
error: could not compile `weechat` (lib) due to 3 previous errors
warning: build failed, waiting for other jobs to finish...

How to reproduce:

  1. git clone https://github.com/poljar/weechat-matrix-rs
  2. cd wechat-matrix-rc
  3. cargo build

Can always be reproduced.

System environment:

$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21) (Fedora 1.75.0-1.fc39)

I am not an rust coder so I am not able to fix this myself; I tried messing around and changing calls to the printf_date_tags method to use printf_datetime_tags instead, but then in the end I still got other follow-up errors I didn't really understand.

In a gist: I can not use weechat-matrix-rs any more and now must use Element in a browser again, ugh :-)

yalla avatar Feb 01 '24 07:02 yalla