Skip to content

Ensure assemblies listed FileList are not loaded - #12968

Merged
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
adityapatwardhan:FileListLoad
Jun 30, 2020
Merged

Ensure assemblies listed FileList are not loaded#12968
Travis Plunk (TravisEz13) merged 2 commits into
PowerShell:masterfrom
adityapatwardhan:FileListLoad

Conversation

@adityapatwardhan

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) commented Jun 16, 2020

Copy link
Copy Markdown
Member

Fixes #12821

PR Summary

Assemblies listed in FileList of the psd1 should not be loaded when the module is loaded. This change fixes the regression introduced in 6.2.0-preview.2

PR Context

Regression was introduced as a side effect of #8073

PR Checklist

Copy link
Copy Markdown
Collaborator

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?

Copy link
Copy Markdown
Member Author

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.

Copy link
Copy Markdown
Collaborator

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?

Comment thread test/powershell/Modules/Microsoft.PowerShell.Core/Import-Module.Tests.ps1 Outdated
@TravisEz13 Travis Plunk (TravisEz13) added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jun 22, 2020
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Jun 29, 2020

@iSazonov Ilya (iSazonov) left a comment

Copy link
Copy Markdown
Collaborator

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.

@TravisEz13 Travis Plunk (TravisEz13) added the CL-Engine Indicates that a PR should be marked as an engine change in the Change Log label Jun 30, 2020
@TravisEz13
Travis Plunk (TravisEz13) merged commit 808bf22 into PowerShell:master Jun 30, 2020
@ghost

Copy link
Copy Markdown

🎉v7.1.0-preview.5 has been released which incorporates this pull request.:tada:

Handy links:

@adityapatwardhan

Copy link
Copy Markdown
Member Author

Aditya Patwardhan (@adityapatwardhan) make sure this repros in 7.0.x

@TravisEz13

Copy link
Copy Markdown
Member

Steve Lee (@SteveL-MSFT) Do we want to back port this?

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj/PowerShell that referenced this pull request Aug 6, 2026
Co-authored-by: Aditya Patwardhan <Aditya Patwardhan>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-Engine Indicates that a PR should be marked as an engine change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Files listed in FileList in module manifest are loaded on module load

3 participants