Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error[E0446]: crate-private type FilesystemScan in public interface #226

Closed
Cellesti opened this issue Jan 22, 2024 · 5 comments
Closed
Labels
help wanted Extra attention is needed

Comments

@Cellesti
Copy link

Hi, since dua-cli v2.27.0, i receive this error while compiling:

error[E0446]: crate-private type `FilesystemScan` in public interface
  --> src/interactive/app/state.rs:42:5
   |
27 | pub(crate) struct FilesystemScan {
   | -------------------------------- `FilesystemScan` declared as crate-private
...
42 |     pub scan: Option<FilesystemScan>,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type

I am on Alpine Linux which is still using Rust 1.72.1 (due to some issues with newer Rust on 32-bit ARM).

I think that is probably the cause of the problem, so may i know if Rust 1.72.1 is still supported by dua-cli?

Thanks.

@Byron Byron added the help wanted Extra attention is needed label Jan 22, 2024
@Byron
Copy link
Owner

Byron commented Jan 22, 2024

Thanks for reporting!

As I always build applications with the latest compiler, as is done by CI, these kinds of issues won't be typically noticed.
However, please feel free to submit a PR or patch for this once you have confirmed it to be working for you, and it will be merged.
Thanks for your help.

@Cellesti
Copy link
Author

I don't know Rust, but if anyone else submits a PR, i can help test it.

This issue is currently blocking the upgrade of the dua-cli package in Alpine, so i would appreciate it if a patch can be found, otherwise the upgrade will probably have to wait for newer Rust to become available in Alpine.

I have also asked for help on the Alpine Gitlab, so hopefully some Rust programmer who uses Alpine will be able to help fix this.

@Byron
Copy link
Owner

Byron commented Jan 22, 2024

Turning pub(crate) struct FilesystemScan { into pub struct FilesystemScan { should already do the trick, in case that's easy for you to try.

@Cellesti
Copy link
Author

Thanks, i've just tested that out in Alpine's Gitlab CI, dua-cli now builds successfully, and tests also pass. So, i would say it works for me.

Byron added a commit that referenced this issue Jan 22, 2024
@Byron
Copy link
Owner

Byron commented Jan 22, 2024

Great! Shouldn't happen in the next release, even though it might happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants