Skip to content

Commit

Permalink
refactor: migrate disk collection code off of heim, remove heim (#1064)
Browse files Browse the repository at this point in the history
Migrates existing heim-based disk data collection code off of it to either sysinfo or vendored code based on heim/sysinfo/other sources. This also allows us to remove heim completely from bottom.

---

* refactor: fix some refresh code

* remove async from the freebsd code

* some file/implementation organization

Turns out sysinfo lacks a lot of data I need. I can still use it for the
Windows disk usage implementation, but I'm probably going to manually
implement macos/linux usage and all io usage stats.

* more restructuring

* Some other fixes

* remove futures

* ready for some big changes?

* big changes

* linux io + reads

* use lossy conversion for mount point

* add windows refresh

* so long heim, and thanks for all the fish

* fix filter behaviour, remove string allocation when reading lines

* rename unix -> system for more accurate file struct representation

* fix freebsd

* port generic unix partition code

* add bindings and fix errors

* finish macOS bindings for I/O

* disable conform check, this seems to... make disk I/O work on macOS?????

* fix linux

* add safety comments

* more comments

* update changelog

* changelog

* We're going full 0.9.0 for this

* update lock

* fix some typing

* bleh

* some file management

* hoist out get_disk_usage

* fix some stuff for Windows

* typing and remove dead code allow lint

* unify typing

* fix

* fix 2

* macOS fix

* Add bindings file for windows

* add windows implementation

* fix macos
  • Loading branch information
ClementTsang authored Apr 10, 2023
1 parent b2801b1 commit 9edde9b
Show file tree
Hide file tree
Showing 37 changed files with 1,623 additions and 765 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.9.0]/[0.8.1] - Unreleased
## [0.9.0] - Unreleased

## Bug Fixes

- [#1021](https://github.com/ClementTsang/bottom/pull/1021): Fix selected text background colour being wrong if only the foreground colour was set.
- [#1037](https://github.com/ClementTsang/bottom/pull/1037): Fix `is_list_ignored` accepting all results if set to `false`.
- [#1064](https://github.com/ClementTsang/bottom/pull/1064): Disk name/mount filter now doesn't always show all entries if one filter wasn't set.
- [#1064](https://github.com/ClementTsang/bottom/pull/1064): macOS disk I/O is potentially working now.
- [#597](https://github.com/ClementTsang/bottom/issues/597): Resolve RUSTSEC-2021-0119 by removing heim.

## Features

Expand All @@ -25,6 +28,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1036](https://github.com/ClementTsang/bottom/pull/1036): Migrate away from heim for memory information; Linux
platforms will also now try to use `MemAvailable` to determine used memory if supported.
- [#1041](https://github.com/ClementTsang/bottom/pull/1041): Migrate away from heim for network information.
- [#1064](https://github.com/ClementTsang/bottom/pull/1064): Migrate away from heim for storage information.
- [#812](https://github.com/ClementTsang/bottom/issues/812): Fully remove heim from bottom.
- [#1075](https://github.com/ClementTsang/bottom/issues/1075): Update how drives are named in Windows.

## Other

Expand Down
Loading

0 comments on commit 9edde9b

Please sign in to comment.