Conversation
|
We should disable the crossgen, but only for our binaries... let me see if I can do this change... |
|
I need to do some testing. |
|
@daxian-dbw FYI |
build.psm1
Outdated
There was a problem hiding this comment.
It seems we should disable Start-CrossGen function.
There was a problem hiding this comment.
We should probably disable Start-CrossGen until we can verify PublishReadyToRun is a good replacement
There was a problem hiding this comment.
CrossGen and ReadyToRun are the same thing, well, it's a switch to crossgen.
There was a problem hiding this comment.
We can use set COMPlus_ReadyToRunLogFile=log.txt from issue I referenced above to check dll-s. Start-CrossGen does not create R2R dll-s.
There was a problem hiding this comment.
@iSazonov crossgen with a switch is what is used to generate readytorun binaries in the dotnet project
There was a problem hiding this comment.
And I switched us to that method, but per DotNet we need to use the csproj if we want our symbols to work: https://github.com/PowerShell/PowerShell/blob/master/build.psm1#L2217
There was a problem hiding this comment.
But can your explain why crossgen should be disabled on the rest of the binaries?
There was a problem hiding this comment.
I forgot that we also crossgen assemblies not part of the build that we include in the package. We should probably still crossgen those.
There was a problem hiding this comment.
This make sense for third-party assemblies. For PSReadline and MI we could move to R2R format.
@iSazonov crossgen with a switch is what is used to generate readytorun binaries in the dotnet project
With set COMPlus_ReadyToRunLogFile=log.txt logs show that after Start-CrossGen our dll-s are not initialized as R2R but with PublishReadyToRun are initialized.
34ce76f to
85fe743
Compare
build.psm1
Outdated
| Write-Log "Run ResGen (generating C# bindings for resx files)" | ||
| Start-ResGen | ||
| } | ||
| # TODO: remove Start-ResGen after testing ReadyToRun |
There was a problem hiding this comment.
Please revert this change. This is the wrong PR
This reverts commit 948b5f8.
@iSazonov You reverted a commit and then applied the same commit again. |
build.psm1
Outdated
| ) | ||
|
|
||
| # TODO: remove Start-CrossGen after testing ReadyToRun. | ||
| return |
There was a problem hiding this comment.
This isn't true, and we should still crossgen the un-optimized binaries.
TravisEz13
left a comment
There was a problem hiding this comment.
Please address changes. I made ALL the needed changes the the crossgen function. Please revert back to my commit.
|
@PoshChan Please remind me in 1 hour |
|
If we need to disable crossgen on the other assemblies, please submit a separate PR. Combining items in PRs makes it difficult if we need to backport. |
|
@TravisEz13, this is the reminder you requested 1 hour ago |
I have only question about PSRL and MI. We could make it readytorun in their repos. If yes I can open tracking issues. Thoughts? |
|
I think it's bad practices in publish the readytorun in the nuget. But I would open a new issue, and just be sure to ask that question. |
|
"At present, libraries can only be R2R compiled as part of an application, not for delivery as a NuGet package."
|
|
In our publish folder we get .Net dll-s in R2R format and trace shows this. If we compiled them locally into this format, then PSRL and MI would also be converted in it. Yes? It makes me think that we get them already in R2R format and I'd expect we could get PSRL and MI in R2R format too. |
|
🎉 Handy links: |
PR Summary
Turn on ReadyToRun for PowerShell dll-s.
We can use dotnet/runtime#35062 (comment) to check dll-s.
PR Context
Now all .Net dll-s is in ReadyToRun format and PowerShell distributive doubled in size. So we can turn on the feature too. It will add ~20Mb (10%).
Docs https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#readytorun-images
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.