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

Platform: windows port #12

Closed
imsnif opened this issue Jun 17, 2020 · 10 comments
Closed

Platform: windows port #12

imsnif opened this issue Jun 17, 2020 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@imsnif
Copy link
Owner

imsnif commented Jun 17, 2020

There are two main things I know of that we need to do to port diskonaut to work on windows:

  1. Currently we rely on hard disk blocks to scan the hard-drive. As far as I know, this does not work on windows, and so we need to find another solution.
  2. Termion doesn't(?) work on windows, so we would need to use another backend for TUI.

I am VERY interested in a solution for this. If you want to work on this and are unsure how to begin, or the points above are not clear, I would be very happy to discuss this with you further and clarify anything. Please do not hesitate. :)

@imsnif imsnif added the help wanted Extra attention is needed label Jun 17, 2020
@Freaky
Copy link
Contributor

Freaky commented Jun 17, 2020

I made filesize as a cross-platform way of getting the size of objects on disk.

Termion looks to be getting there.

@imsnif
Copy link
Owner Author

imsnif commented Jun 18, 2020

Hey @Freaky, I saw your PR and will take a look at it shortly regarding filesize. Thanks for this!

Since diskonaut uses tui-rs, I think we can definitely switch the backend to crossterm or something that supports windows with a conditional compilation flag. So even if it takes a while for that Termion issue to be merged, I think we can still go forward with this.

@imsnif
Copy link
Owner Author

imsnif commented Jun 18, 2020

So to update this issue: thanks to @Freaky, 1 has been taken care of. We are left with 2.

@pm100
Copy link
Contributor

pm100 commented Sep 14, 2020

what the state here. I have a rough version working with crossterm on windows. Is this interesting or are you waiting for termion to get a working windows version.

Could either switch 100% to crossterm, or make the backend choice a feature. I dont know enough to be able to say whats best, easiest is 100% switch

@imsnif
Copy link
Owner Author

imsnif commented Sep 14, 2020

Very interesting! I'd be happy to move 100% to crossterm (we've recently done something similar with bandwhich) if it gives us windows support. Only thing is I'd like to manually test it on linux/mac first to make sure it's okay, because our tests mock the tui backend.

@pm100
Copy link
Contributor

pm100 commented Sep 14, 2020

ok, this is 100% switch to crossterm, runs on my windows 10 dev box and on my rasp pi.

The tests dont even compile so I have not sent you a pull request. But you can check it out here https://github.com/pm100/diskonaut

Let me know if you find anything broken

@pm100
Copy link
Contributor

pm100 commented Sep 14, 2020

BTW - I found this project via 'this week in rust' projects looking for help.

Total rust noob.

@pm100
Copy link
Contributor

pm100 commented Sep 14, 2020

tests now compile. they all fail, I dont know how they work so not sure how to fix. You seem to be testing to see what draw commands are issued, hers the failure on the first test i drilled into

thread 'tests::cases::ui::two_large_files_one_small_file' panicked at 'assertion failed: `(left == right)`
  left: `[Clear, HideCursor, Draw, HideCursor, Flush, Draw, HideCursor, Flush, Clear, ShowCursor]`,
 right: `[Clear, HideCursor, Draw, Flush, Draw, Flush, Clear, ShowCursor]`', src\tests\cases\ui.rs:106:5

I wonder if this is just a difference of how tui drives the backend, not sure.

@imsnif
Copy link
Owner Author

imsnif commented Sep 15, 2020

Hey @pm100, I took a brief look at the repo and it looks like a great start! I haven't yet tested this locally though, and if you'd like to move forward with this I'll definitely take a closer look.

About the tests: it definitely might be. I wouldn't worry too much about these (you can even comment them out for now) and would more try to concentrate on the snapshots. These are snapshots taken of the UI in each draw event (as a delta of what was on the screen in the previous draw event). They should not be very different and should make it easier to understand what changed.

Do feel free to open a PR though, even with failing tests. I think it will make it easier for us to discuss.

Also - I'm happy you found this project and want to work on this. No worries about experience levels, I think you're doing great. :)

@imsnif
Copy link
Owner Author

imsnif commented Sep 23, 2020

Released in 0.11.0, thanks @pm100 !!

@imsnif imsnif closed this as completed Sep 23, 2020
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

3 participants