-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
RunReadyToRunCompiler task doesn't produce actionable information on failures #15466
Comments
I agree on that. It was too late to fix it for 5.0 release when I hit this issue. |
The first suggestion was implemented in #15529. Still need to implement the second one. |
@trylek I just tried SDK publishing with normal verbosity: dotnet new console
dotnet publish --packages pkg -p:PublishReadyToRun=True -p:PublishReadyToRunUseCrossgen2=True -c Release -r win-x64 -v:n and that does output the Crossgen2 command line. For .NET 5:
For .NET 6:
Maybe the issue is not in the SDK? |
Closing this as fixed on the SDK side. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While switching over framework compilation to use Crossgen2 I noticed that the RunReadyToRunCompiler task in
sdk/src/Tasks/Microsoft.NET.Build.Tasks/RunReadyToRunCompiler.cs
Line 14 in d2a44c1
isn't too developer friendly when hitting errors. In most cases the only diagnostic output is the error message "Invalid parameters were passed to RunReadyToRunCompiler task" no matter whether the problem is missing JitPath, DOTNET_ROOT not pointing at the .dotnet folder and preventing execution of the crossgen2 managed executable or anything else.
Even locally it's super complicated to identify what went wrong; on top of that the absence of any diagnostic output makes it very hard to identify whether crossgen or crossgen2 compilation has taken place from AzDO lab jobs. The purpose of this issue is to improve this situation. Here are some suggestions that come to mind:
ValidateParameters should spew diagnostic output stating clearly which parameter it doesn't like and for what reason.
Similar to CoreCLR Crossgen2 test build, we should display command lines representing the individual Crossgen2 executions when compiling the framework and error information upon failure. I haven't managed to receive any logging information about Crossgen2 executions even after I bumped up msbuild verbosity to diagnostic.
/cc: @dotnet/crossgen-contrib
/cc: @jkoritzinsky, @AntonLapounov
The text was updated successfully, but these errors were encountered: