You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy "D:\Repos\runtime\artifacts\bin\coreclr\Windows_NT.x64.Checked\System.Private.CoreLib.dll"
To D:\Repos\runtime\artifacts\bin\testhost\net5.0-Windows_NT-Checked-x64\shared\Microsoft.NETCore.App\5.0.0\
You're changing src/libraries/System.Private.CoreLib/src/System/Number.Parsing.cs and src/libraries/System.Runtime/tests right? @safern didn't we recently change things so that building src\libraries\System.Runtime\tests would also build System.Private.Corelib? In that case I would expect you could build clr+libs just once, and then iterate by doing dotnet build /t:build;test on System.Runtime\tests. Would that be right?
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:
I would not have figured that out. I wonder whether this is worth adding as an example to build -? and also documenting in docs/workflow/building/libraries/README.md. It's always good when we couch docs/help in terms of "if you want to do common thing X, then use this command line Y".
I would not have figured that out. I wonder whether this is worth adding as an example to build -? and also documenting in docs/workflow/building/libraries/README.md. It's always good when we couch docs/help in terms of "if you want to do common thing X, then use this command line Y".
Worked very well. Now it takes 30~60 seconds to compile, much better than 12 minutes. Thanks.
Shouldn't restore be super fast now, if it's already run?
It is, but in this case since you're using build.cmd it takes a few seconds to run the global tools install that arcade does for Tools.props etc, so it saves some seconds.
Activity
felipepessoto commentedon Jul 2, 2020
@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
D:\Repos\runtime\src\libraries\System.Runtime\tests> dotnet build /t:Test /p:Configuration=Checked
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"
To D:\Repos\runtime\artifacts\bin\testhost\net5.0-Windows_NT-Checked-x64\shared\Microsoft.NETCore.App\5.0.0\
D:\Repos\runtime\src\libraries\System.Runtime\tests> dotnet build /t:Test /p:Configuration=Checked
danmoseley commentedon Jul 2, 2020
You're changing
src/libraries/System.Private.CoreLib/src/System/Number.Parsing.csandsrc/libraries/System.Runtime/testsright? @safern didn't we recently change things so that buildingsrc\libraries\System.Runtime\testswould also buildSystem.Private.Corelib? In that case I would expect you could buildclr+libsjust once, and then iterate by doingdotnet build /t:build;teston System.Runtime\tests. Would that be right?safern commentedon Jul 2, 2020
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.
danmoseley commentedon Jul 2, 2020
@felipepessoto does that work for you?
I would not have figured that out. I wonder whether this is worth adding as an example to
build -?and also documenting indocs/workflow/building/libraries/README.md. It's always good when we couch docs/help in terms of "if you want to do common thing X, then use this command line Y".felipepessoto commentedon Jul 2, 2020
I'll try it.
@safern, do you also know the easiest way to debug System.Private.CoreLib? Like the Number class
safern commentedon Jul 2, 2020
Yeah makes sense, I'll add it.
I usually just use the VS Test explorer and set breakpoints in System.Private.CoreLib source code
felipepessoto commentedon Jul 2, 2020
Worked very well. Now it takes 30~60 seconds to compile, much better than 12 minutes. Thanks.
safern commentedon Jul 2, 2020
Btw, if you pass down the
-buildaction to the script it will be faster since it will not do any of the-restoreroutines. i.e:danmoseley commentedon Jul 2, 2020
Shouldn't restore be super fast now, if it's already run?
safern commentedon Jul 2, 2020
It is, but in this case since you're using
build.cmdit takes a few seconds to run the global tools install that arcade does forTools.propsetc, so it saves some seconds.Remove unsafe code from number parsing and formatting (#131913)