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

Does not compile on Windows #13

Open
ChrisGreenaway opened this issue Jun 26, 2020 · 2 comments
Open

Does not compile on Windows #13

ChrisGreenaway opened this issue Jun 26, 2020 · 2 comments

Comments

@ChrisGreenaway
Copy link

I understand that this is clearly not designed to work on Windows, but it would be good to at least have this library compile on Windows, even if it just gives Err() when invoked.

We have a mixture of development environments (although all deployment is Linux) and I don't want to break the Windows based workflow by introducing this as a dependency.

BTW - the project looks really nice - I don't understand why your recent download stats are so low: https://crates.io/crates/block-utils

@cholcombe973
Copy link
Owner

Yeah I understand where you're coming from. I develop on a mac locally but deploy into production linux environments and it's not great when the libraries won't compile locally. I don't have a windows environment to test on. Would it be possible for you to setup a PR for this?
Hard to say why the download stats are low. Maybe I didn't do a great job explaining the libraries purpose in the readme.

@ChrisGreenaway
Copy link
Author

I'm sorry, but I don't have enough invested in this library to make a PR for you. This was just an obvious blocker to adoption for us.
However, I can give you the errors that I get when trying to compile:

$ cargo build
   Compiling block-utils v0.8.2
error[E0433]: failed to resolve: could not find `unix` in `os`
  --> C:\Users\CGRE\.cargo\registry\src\git.luolix.top-1ecc6299db9ec823\block-utils-0.8.2\src\lib.rs:24:14
   |
24 | use std::os::unix::fs::MetadataExt;
   |              ^^^^ could not find `unix` in `os`

error[E0599]: no method named `dev` found for struct `std::fs::Metadata` in the current scope
    --> C:\Users\CGRE\.cargo\registry\src\git.luolix.top-1ecc6299db9ec823\block-utils-0.8.2\src\lib.rs:1062:28
     |
1062 |         if parent_metadata.dev() != dir_metadata.dev() {
     |                            ^^^ method not found in `std::fs::Metadata`

error[E0599]: no method named `dev` found for struct `std::fs::Metadata` in the current scope
    --> C:\Users\CGRE\.cargo\registry\src\git.luolix.top-1ecc6299db9ec823\block-utils-0.8.2\src\lib.rs:1062:50
     |
1062 |         if parent_metadata.dev() != dir_metadata.dev() {
     |                                                  ^^^ method not found in `std::fs::Metadata`

error: aborting due to 3 previous errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants