-
Notifications
You must be signed in to change notification settings - Fork 126
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
Try find port type in parent device #170
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.
I would highly recommend not bringing in regex for such an operation due to its extreme compilation weight & size cost.
Review is tied with #201 |
Thank you for creating this PR @soiamsoNG! Looking at the MODALIAS strings is definitely something we can do for improving finding a certain device in a Docker environment. I agree with @RossSmyth, that using the regex crate is - despite its convenience - on the heavy side. #168 contains measurements showing a significant reduction of built times for Windows by switching to regex-lite. We are currently also evaluating custom parsing of similar strings in #201 and it looks to me at a first glance that we have a good chance to get away with a much simpler parsing for MODALIAS strings than using regex or regex-lite. Looking at |
There is no special requirement for having them there and they are cluttering up the match statement.
Thank you @soiamsoNG and @RossSmyth for your contributions! |
for docker enviroment udev not run well for device add by --device
without ID_BUS like ID* property, but we still can try find the must info from its parent.
below is sample output from udevadm info -t /dev/ttyACM0