Fix 'FixupFileName' to not load resolved assembly during module discovery#8634
Conversation
42e2e36 to
4e21340
Compare
|
@SteveL-MSFT The |
test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1
Outdated
Show resolved
Hide resolved
adityapatwardhan
left a comment
There was a problem hiding this comment.
Also can you add the [Feature] flag to run all tests?
test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1
Outdated
Show resolved
Hide resolved
|
@adityapatwardhan Good point. I will add the feature tag. |
f9e538a to
0463a88
Compare
6435a41 to
c311a77
Compare
|
I expect that the PR increase performance but we haven't |
|
@iSazonov Changes in this PR could improve the module analysis perf for binary modules in general, because we now avoid the loading. But for the warm startup where the analysis cache has already been created, there's likely no difference. The change to This PR is mainly to fix the wrong behavior and also make |
test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1
Outdated
Show resolved
Hide resolved
aa6b004 to
61eea6a
Compare
|
@daxian-dbw Great! 👍 |
PR Summary
Changes are as follows:
FixupFileNameto not load an assembly in module analysis if the assembly path has been resolved. This way, the module analysis viaGet-Module -ListAvailablewouldn't load the module assemblies unexpectedly.RequiredAssembliesprocessing to not add the same assembly to theToProcesslist twice, so that we can avoid loading the same assembly twice.#if !CoreCLRsection about CLR version and .NET framework version.PR Context
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.[feature]to your commit messages if the change is significant or affects feature tests