-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Ensure assemblies listed FileList are not loaded
#12968
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need skipLoading if we have isImportingModule?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though we are importing the module, we should not be loading the files in FileList here. FileList is meant to be just a list of all the files in the module. It should not have effect on the loading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new parameter description and name could be more informative.
getFileListOnly?
test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1
Outdated
Show resolved
Hide resolved
76cd6d5 to
0cd12fe
Compare
iSazonov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with one minor comment.
|
🎉 Handy links: |
|
@adityapatwardhan make sure this repros in 7.0.x |
|
@SteveL-MSFT Do we want to back port this? |
Fixes #12821
PR Summary
Assemblies listed in
FileListof thepsd1should not be loaded when the module is loaded. This change fixes the regression introduced in6.2.0-preview.2PR Context
Regression was introduced as a side effect of #8073
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.