asciinema / agg

asciinema gif generator
https://docs.asciinema.org/manual/agg/
Apache License 2.0
1.18k stars 43 forks source link

build failure: field background of struct Pen is private #30

Closed simonmichael closed 1 year ago

simonmichael commented 1 year ago

Thanks for maintaining this project. I get this build error:

$ cargo install --path .
...
   Compiling agg v1.3.0 (/Users/simon/src/DEVTOOLS/agg)
error[E0616]: field `background` of struct `Pen` is private
   --> src/renderer/fontdue.rs:148:38
    |
148 |                 if let Some(c) = pen.background {
    |                                      ^^^^^^^^^^ private field
    |
help: a method `background` also exists, call it with parentheses
    |
148 |                 if let Some(c) = pen.background() {
    |                                                ++
...
$ cargo --version
cargo 1.67.1 (8ecd4f20a 2023-01-10)
$ rustc --version
rustc 1.67.1 (d5a82bbd2 2023-02-07)
ku1ik commented 1 year ago

I recently made a change to vt-rs lib, refactoring mostly, changing visibility of some struct's fields, adding getters etc. So that looks like it. However I'm not sure how this managed to affect agg since agg's Cargo.lock file tracks specific commit ID... :thinking:

ku1ik commented 1 year ago

I've pushed an update to Cargo.toml in 4b605b6eb670bfaba2cfda1cb258cfbfdfc1f2d4, explicitly pinning latest working version of vt module. That should solve your problem.