-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Tests which depend on the host don't use a live built version #58109
Comments
Tagging subscribers to this area: @dotnet/runtime-infrastructure Issue DetailsBoth the linker tests and the singlefile tests use a prebuilt version of the host instead of the live built one. In general we want to use live built assets where possible. In addition to that, when the repository revs to the next major version and the SDK doesn't yet understand the net7.0 tfm, the prebuilt host isn't discovered without help ( TL;DR: Tests which depend on the apphost should have a dependency on the host subset being built first.
|
cc: @agocke |
Note: singlefilehost is part of the CLR partition. I think the single file tests all use the just-built single file host, but I may be forgetting some |
Since cab3a63, corehost is built before libs subset, so I guess this objective is completed more broadly. Can't wait to see live corehost being dogfooded to those tests (and other usages of |
@agocke now that the live built host is part of the testhost folder this item tracks removing the remaining dependencies on a prebuilt host. It would be great if we could tackle this before we rev to .NET 8. The change would need to be done directly in targetingpack.targets by supplying the path to the host |
In theory yes, but the tricky part is the Microsoft.NET.IL.Sdk which today is used by all the .ilproj project files. We would need to convert those to not use the |
There's an extension point in the SDK, where setting ILAsmToolPath is enough to use a custom ILAsm. We use it here: Line 118 in 178553b
|
Right, we definitely want to use such an extension point, but I was referring to that even then we would still use the Microsoft.NET.IL.Sdk prebuilt package which we should also get rid off to avoid the self dependency in the source build graph. See #71326 for more details. |
@ViktorHofer, this is an interesting point. Can |
Yes they can and should. I Was attempting to use the live System.Text.Json at some point but gave up because of an infrastructure issue. We should definitely make this work. |
Yup, HostModel and DependencyModel can get rid of Newtonsoft.Json and FluentAssertions dependencies. I wanted to remove some reflection code in installer tests, which is waiting for 7.0.0-preview7+ (to be able to use |
Contributes to dotnet/runtime#58109 In dotnet/runtime we live build targeting packs, runtime packs and app host packs. For the former two, switches already exist to disable nuget restore: - EnableTargetingPackDownload - EnableRuntimePackDownload The latter one doesn't yet have such a switch and therefore is always restored by NuGet. In the cases where want to use the live built apphost pack, restore fails, i.e. from a runtime build: `artifacts/bin/trimmingTests/projects/Microsoft.Extensions.DependencyInjection.TrimmingTests/ActivatorUtilitiesTests/osx-x64/project.csproj(0,0): error NU1102: (NETCORE_ENGINEERING_TELEMETRY=Build) Unable to find package Microsoft.NETCore.App.Host.osx-x64 with version (= 8.0.0)`
* Add switch to disable apphost pack restore Contributes to dotnet/runtime#58109 In dotnet/runtime we live build targeting packs, runtime packs and app host packs. For the former two, switches already exist to disable nuget restore: - EnableTargetingPackDownload - EnableRuntimePackDownload The latter one doesn't yet have such a switch and therefore is always restored by NuGet. In the cases where want to use the live built apphost pack, restore fails, i.e. from a runtime build: `artifacts/bin/trimmingTests/projects/Microsoft.Extensions.DependencyInjection.TrimmingTests/ActivatorUtilitiesTests/osx-x64/project.csproj(0,0): error NU1102: (NETCORE_ENGINEERING_TELEMETRY=Build) Unable to find package Microsoft.NETCore.App.Host.osx-x64 with version (= 8.0.0)`
The NativeExports.csproj is yet another component that use a prebuilt version of the host instead of the live built version. DNNE is invoked and given the apphost path. We should fix this by defining a dependency to the apphost from NativeExports.csproj. We don't need the singlefilehost, just the apphost. Related: #79144. |
Both the linker tests and the singlefile tests use a prebuilt version of the host instead of the live built one. In general we want to use live built assets where possible. In addition to that, when the repository revs to the next major version and the SDK doesn't yet understand the net7.0 tfm, the prebuilt host isn't discovered without help (
KnownAppHostPack
AppHostPackVersion update).TL;DR: Tests which depend on the apphost should have a dependency on the host subset being built first.
The text was updated successfully, but these errors were encountered: