Add Additional MediaType and DeviceType variants; upgrade nix and strum#46
Add Additional MediaType and DeviceType variants; upgrade nix and strum#46iamjpotts wants to merge 1 commit intocholcombe973:masterfrom
Conversation
There was a problem hiding this comment.
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 |
Vendorcan nowDisplayVendor:VboxtoVendor::VirtualBoxVendor::NonetoVendor::ATAto match its vendor stringDevice::vendoranOptionthat defaults toOption::Noneinstead ofVendor::Nonewhen vendor is unknownMediaType::Opticalfor when a CD or DVD drive (or a virtual variant of the same) is detectedMediaType::Partitionsto represent detection of a partition table on a deviceMediaType::Partitionto represent when a device represents a partitionMediaType::VirtualtoMediaType::Qemuto distinguish it from Virtual Box mediaMediaType::VirtualBoxMediaType::Unrecognisedwith a field to expose the vendor of unrecognized mediaMediaTypecan nowDisplayDeviceType::Unrecognisedto expose the value of a device type that is not represented as an enum variantMediaType::Unknownstill exists but is now only used when the matching rules don't have any input to work with.nixfrom 0.23 to 0.26. There is a newer version 0.27 but it has breaking changes.strumfrom 0.24 to 0.25cargo editionfrom 2018 to 2021udevcannot be easily upgraded; there is a breaking change toEnumeratorownership relatedscan_deviceswhich will require a significant refactor to some of the_iterfunctions.Lastly I bumped the crate version from
0.11to0.12.0to represent that this is a breaking change. [edited this comment to reflect your feedback]