-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
Refactor System.IO.Path
#91
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.
Wow! That's a lot of improvements.
Wondering if we really need support for UNC paths... 🤔
I can't think of a use case in nano that can use it...
In order to keep libraries and firmware as small as possible, we heigth the cost/benefit/usage before adding new stuff. Just because we can, we don't rush into adding it.
Please don't get me wrong, I'm not picking on your work here.
That's why we hav on the contribution guideline the suggestion to first discuss changes and new code before actually start active work on it. In order to save time (and frustration) 😉
Open for discussion.
Makes perfect sense and I actually questioned the UNC support while I was copying it over. Speaking of copying it over the majority of this work came directly from the .NET Core implementation and so from that aspect it was easier for me to copy as is and trim stuff out from there. This allowed me to implement the unit tests in a .NET Core project, from a known set of behaviors, and confirm they ran the same in the nanoFramework implementation. My motivation for starting down this Happy to trim out things we don't need and will start with the UNC support. |
I started looking at the UNC handling and it looks like the old code had, at least partial, support:
Additionally at first glance even though the new code is ~50 lines more (a poor metric I know) it appears to be much smaller (top is the latest NuGet and bottom is this branch build in release mode): I'll investigate this a little further but it appears this gets things in line with the .NET Full behavior and doesn't add anything additional space wise. |
Character wise (I know, not a real metric) if I remove comments the old implementation is 14,263 characters and the new one is 14,154 (manual removal so some margin of error ;)). Long story short the only thing added was correct handling of all expected cases and I think we're good to go unless I missed something. PS: The SonarCloud bug is not actually a bug since our |
I marked it in Sonar, should be good for the next time you'll push anything |
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.
couple of comments and bonus point for the tests!
@CoryCharlton not arguing that it wasn't there before. 😄 Rather if we need it. |
For the record: internal discussion started to gather thoughts on this UNC matter). |
Kudos, SonarCloud Quality Gate passed!
|
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.
LGTM! Thanks 👍🏻
Description
Motivation and Context
The
System.IO.FileSystem
library hasn't got love in a while so this was another opportunity to clean up the code and confirm we are following the implementations in .NET fullHow Has This Been Tested?
Screenshots
Types of changes
Checklist: