Skip to content
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

Reenable crossgen test coverage #13279

Closed
sfoslund opened this issue Aug 31, 2020 · 4 comments · Fixed by #14194
Closed

Reenable crossgen test coverage #13279

sfoslund opened this issue Aug 31, 2020 · 4 comments · Fixed by #14194
Assignees

Comments

@sfoslund
Copy link
Member

Crossgen test coverage had to be disabled in #13168 because api-ms-win-core-console-l1-2-0.dll was missing. These tests need to be reenabled when this is fixed.

@mangod9
Copy link
Member

mangod9 commented Sep 1, 2020

@AntonLapounov to investigate why the crossgen tests are now failing.

@AntonLapounov
Copy link
Member

This is caused by dotnet/runtime#40642 when we started to copy UCRT version 16299 (missing the file in question) instead of UCRT version 18362 (having the file in question).

@hoyosjs What was the scenario for using versionless UCRT? Apparently ConsolePal.Windows.cs uses PeekConsoleInputW, which requires api-ms-win-core-console-l1-2-0.dll.

@hoyosjs
Copy link
Member

hoyosjs commented Sep 3, 2020

It was that way before my change: https://github.com/hoyosjs/runtime/blob/fef9ca70f6e7268dfc9e0f600433f5293932f166/src/coreclr/build-runtime.cmd#L544.

I added the versioned fallback in hoyosjs/runtime@0d42ea8#diff-1c915a89b3b3dfb81e6fd68aa7664a4a but I had a typo in the versionless path. The commit you found was just fixing that path.

@jkoritzinsky moved this from MSBuild into a batch orchestrator as part of dotnet/runtime#31701. And then before that it's been like this for over two years https://github.com/dotnet/runtime/blame/264fd0e69d97a259bb6eb3afc7759801fd269b63/src/coreclr/src/build.proj#L47. I looked and all the way back to 3.1.0 we didn't ever ship api-ms-win-core-console-l1-2-0.dll

I think the problem comes to be that the build of the crossgen2 tool in https://github.com/dotnet/runtime/blob/master/src/installer/pkg/projects/netcoreapp/pkg/Microsoft.NETCore.App.Crossgen2.pkgproj uses the checked in SDK to call GenerateDepsJsonFile, it ends up with api-ms-win-core-console-l1-2-0.dll as a dependency (because the SDK had a runtime that included that API stub). Afterwards it copies live built bits to create a self contained app. This means any removed/added dlls will end up in the deps file but not included in the package or the other way around. This feels brittle, I am not sure I have a good suggestion over how to fix this... Modifying the deps file feels like a bad idea during the build, but we can't modify the runtime SDK to one that matches always...

@jkoritzinsky
Copy link
Member

In dotnet/runtime#38457 we'll be switching to a different way of generating the deps file for the crossgen2 package, so we won't have this problem (it will be generated based on the files we package in the end instead of based on the SDK we built against)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants