solidiquis/erdtree

Can't build latest version

cbeust opened this issue · 3 comments

Windows 11, MSys 2, rustc 1.69.0:

error[E0433]: failed to resolve: use of undeclared type `AnsiEscaped`
   --> src\render\tree\node\display\mod.rs:122:31
    |
122 |             let out = <str as AnsiEscaped>::truncate(&ln, window_width);
    |                               ^^^^^^^^^^^ use of undeclared type `AnsiEscaped`

error[E0433]: failed to resolve: use of undeclared type `AnsiEscaped`
   --> src\render\tree\node\display\mod.rs:146:31
    |
146 |             let out = <str as AnsiEscaped>::truncate(&ln, window_width);
    |                               ^^^^^^^^^^^ use of undeclared type `AnsiEscaped`

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/main.rs:1:30
  |
1 | #![cfg_attr(windows, feature(windows_by_handle))]
  |                              ^^^^^^^^^^^^^^^^^

Ahh yes a contributor ran clippy but failed to check the windows build. The github workflow also only checks the linux build which is something I need to address. Regardless, the issue has been resolved and you should know be able to manually build the HEAD of the master branch. Let me know if you have further issues!

Yup, the errors are gone, but it's still failing with:

error[E0554]: `#![feature]` may not be used on the stable release channel
 --> src/main.rs:1:30
  |
1 | #![cfg_attr(windows, feature(windows_by_handle))]
  |

Is it expected that erdtree can only be compiled by the unstable channel?

Ahh yes unfortunately compiling for Windows does require nightly in order to support the detection of hardlinks via this API. Without it hardlinks that are descended from the same root would be double counted towards total memory usage.

edit: For reference:

#[cfg(windows)]