-
Notifications
You must be signed in to change notification settings - Fork 17
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
Add Additional MediaType and DeviceType variants; upgrade nix and strum #46
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work. Yeah since this is a breaking change I usually would just bump the version to 0.12. I don't know if the alpha tag in addition is necessary.
You can bump the version along with this PR. I'm not picky 🙂.
I suppose my other thought with the alpha tag is how long would you want to leave it in place before promoting it to stable?
7aaa30a
to
146e697
Compare
I've squished the two commits into one and changed the version to In my own repos I often have a pre-release suffix on the version while there are unpublished changes in the default branch, but everyone's processes can be different. |
Doing a bit more experimentation on more hardware and VMs. I think i'm going to make a revision to the PR and can improve the media type matching rule. In the mean time, it would be helpful for CI to be enabled. It's disabled due to this being my first PR to this repo. |
Sure no problem. I thought I enabled it already but I clicked it again. |
146e697
to
5175113
Compare
@cholcombe973 i've made my updates to the matching rules and enum variants. They're not perfect but they should be an improvement. Tested on VirtualBox, a server with a raid controller, and a consumer desktop. |
…ve MediaType detection. Upgrade some dependencies.
5175113
to
3287588
Compare
Added |
Vendor
can nowDisplay
Vendor:Vbox
toVendor::VirtualBox
Vendor::None
toVendor::ATA
to match its vendor stringDevice::vendor
anOption
that defaults toOption::None
instead ofVendor::None
when vendor is unknownMediaType::Optical
for when a CD or DVD drive (or a virtual variant of the same) is detectedMediaType::Partitions
to represent detection of a partition table on a deviceMediaType::Partition
to represent when a device represents a partitionMediaType::Virtual
toMediaType::Qemu
to distinguish it from Virtual Box mediaMediaType::VirtualBox
MediaType::Unrecognised
with a field to expose the vendor of unrecognized mediaMediaType
can nowDisplay
DeviceType::Unrecognised
to expose the value of a device type that is not represented as an enum variantMediaType::Unknown
still exists but is now only used when the matching rules don't have any input to work with.nix
from 0.23 to 0.26. There is a newer version 0.27 but it has breaking changes.strum
from 0.24 to 0.25cargo edition
from 2018 to 2021udev
cannot be easily upgraded; there is a breaking change toEnumerator
ownership relatedscan_devices
which will require a significant refactor to some of the_iter
functions.Lastly I bumped the crate version from
0.11
to0.12.0
to represent that this is a breaking change. [edited this comment to reflect your feedback]