Migrate Tasks in the NuGet repo to the new Task type
- Dominant language
- C#
- Stars
- 5.5k
- Forks
- 1.5k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 141
Description
NuGet tasks run in every restore. Many of them keep cached state in static members, which is not safe when projects share a process, so migrating them needs real rework rather than just an attribute.
The tasks are migrated: 18 of 21 NuGet tasks enlightened (86%). What is left would be migrated on demand if telemetry or perf tests would show its benefit.
## Steps
- [x] Migrate the NuGet tasks [size L]
- [ ] Migrate the remaining tasks [size M]
## Stakeholders
Everyone running `dotnet restore`, or a build that restores, which is nearly every build.
## Definition of done
Every NuGet task either runs in multithreaded mode, or is recorded as intentionally left out.
Original description
Specific things to consider
* how to manage the cached state (static members) that many NuGet Tasks use
* if Graph Restore can be moved to use Net TaskHost instead of the Exec of a separate binary today.
* for the Restore task specifically - if it's in-proc can it do better multithreading?
Looks like there are [6 specific Tasks](https://github.com/search?q=repo%3ANuGet%2FNuGet.Client+%28%22%3A+Task%22+OR+%22ICancelableTask%22%29+path%3Asrc%2FNuGet.Core%2FNuGet.Build.Tasks%2F*.cs&type=code).
Notes: This will not be simple enlightening mode, there will be some re-work required to rewrite these tasks more deeply
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.