-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Remove unsafe code from number parsing #10397
Comments
Tagging subscribers to this area: @tannergooding |
@danmosemsft, @tannergooding, do you know a better strategy to edit/build/test it? I was running these two command, but the first one takes a long time to run: .\build.cmd -subset clr+libs -c Checked /p:BuildNative=false So, I'm currently doing this: .\build.cmd -subset clr -c Checked /p:BuildNative=false Copy "D:\Repos\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\System.Private.CoreLib.dll" D:\Repos\runtime\src\libraries\System.Runtime\tests> dotnet build /t:Test /p:Configuration=Checked |
You're changing |
Yeah we did but that doesn’t update the testhost because System.Private.CoreLib configuration has to match the whole runtime. What I do when I change System.Private.CoreLib and want to iterate on it to test again I run:
that will build Corelib, will run cross gen in it and will bin place it in the testhost. |
@felipepessoto does that work for you? I would not have figured that out. I wonder whether this is worth adding as an example to |
I'll try it. |
Yeah makes sense, I'll add it.
I usually just use the VS Test explorer and set breakpoints in System.Private.CoreLib source code |
Worked very well. Now it takes 30~60 seconds to compile, much better than 12 minutes. Thanks. |
Btw, if you pass down the
|
Shouldn't restore be super fast now, if it's already run? |
It is, but in this case since you're using |
There is heavy use of unsafe code in number.parsing.cs and calling code (eg at
runtime/src/libraries/System.Private.CoreLib/src/System/Number.Parsing.cs
Line 255 in 110282c
ReadOnlySpan<char>
to eliminate thechar *
resulting in safer code that is also easier to read.Relates to dotnet/coreclr#17808
The text was updated successfully, but these errors were encountered: