Support nuget static graph eval in Build.props#5226
Conversation
| <_SolutionRestoreProps Include="@(_SolutionBuildProps)" /> | ||
| <_SolutionRestoreProps Include="__BuildPhase=SolutionRestore" /> | ||
| <_SolutionRestoreProps Include="_NETCORE_ENGINEERING_TELEMETRY=Restore" /> | ||
| <_SolutionRestoreProps Include="MSBuildRestoreSessionId=$([System.Guid]::NewGuid())" /> |
There was a problem hiding this comment.
We were not passing this property to _IsProjectRestoreSupported target, will it change anything?
There was a problem hiding this comment.
That target doesn't run for static graph evaluation it doesn't need to be passed in.
There was a problem hiding this comment.
What's are the pros/cons of setting RestoreUseStaticGraphEvaluation to true? Would setting it by default for all repos be good/bad?
There was a problem hiding this comment.
That would be SUPER bad. That mode doesn't support all feature that the current nuget restore supports. Ie hook targets are removed, item property conversion doesn't work, etc. We should move the main repos over to use it (as restore and no-op restore are faster) but this definitely needs to continue being an opt-in for some time.
There was a problem hiding this comment.
Ok, then I suggest we file an issue in Arcade that tracks the progress and link if from here. Let's mention the requirements there, so that repo owners have some info based on which they could decide to enable or not. Also I'd name the property name like so: RestoreUsingStaticGraphEvaluation
There was a problem hiding this comment.
Ok, then I suggest we file an issue in Arcade that tracks the progress and link if from here.
Sounds good but I would prefer doing this in a follow-up issue. I will be OOF rest of the week and I want to get this in for dotnet/runtime to be able to use the switch, ie for projects passed in via the -projects switch.
Also I'd name the property name like so: RestoreUsingStaticGraphEvaluation
I'm hesitant renaming the switch to something else than the nuget property's name. That would easily confuse consumers.
There was a problem hiding this comment.
This feels like something that should be documented in Arcade as well. Perhaps in the SDK doc?
There was a problem hiding this comment.
I'm hesitant renaming the switch to something else than the nuget property's name. That would easily confuse consumers.
Makes sense.
There was a problem hiding this comment.
Sounds good but I would prefer doing this in a follow-up issue.
Sure.
|
Merging as @ViktorHofer is OOF and builds are green and seems like @tmat agreed on his statements above, he can follow up for the issue and docs once he's back. |
This allows to set
RestoreUseStaticGraphEvaluationin Build.props so that projects invoked via-projectscan use the new nuget static graph evaluation restore.