arcade
arcade copied to clipboard
Introduce service abstractions and dependency injection in SignTool
Making the changes in https://github.com/dotnet/arcade/pull/16091 was challenging due to the need to adjust many function headers to pass around specific .NET executable paths and related process logic. Additionally, the SignTool project currently has a lot of repeated functionality, especially around running external processes (e.g., invoking msbuild, pkg, tar), locating executables, and managing their arguments.
Proposal
- Refactor the SignTool project to introduce dedicated service abstractions for process execution, pkg, tar, msbuild, and any other external tools.
- Implement these services and register them via Dependency Injection (DI), so dependencies are injected where needed rather than passed through function calls or duplicated logic.
- Consolidate repeated logic (finding executables, running commands, parsing output) into these service classes.
Agreed overall.
There is some ongoing talk about moving SignTool into the native ESRP tooling. If this happened, I think a complete rewrite would be in order. With, ya know..some real testing.