Skip to content

Use params in ImportPSModule() definition - #7933

Merged
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
iSazonov:use-params-in-importpsmodule
Oct 5, 2018
Merged

Use params in ImportPSModule() definition#7933
Ilya (iSazonov) merged 1 commit into
PowerShell:masterfrom
iSazonov:use-params-in-importpsmodule

Conversation

@iSazonov

@iSazonov Ilya (iSazonov) commented Oct 3, 2018

Copy link
Copy Markdown
Collaborator

PR Summary

Close #6005.

Change method definition
from public void ImportPSModule(string[] name)
to public void ImportPSModule(params string[] name)

PR Checklist

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Should we add the change to SDK?
Should we document this in PowerShell-Docs repo?

@iSazonov Ilya (iSazonov) changed the title Use params in ImportPSModule Use params in ImportPSModule() definition Oct 3, 2018

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a test?

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Steve Lee (@SteveL-MSFT) Could you please clarify - seems we haven't test for public APIs at all, only for cmdlets and other language objects. I don't even know where to put it. I even think that most likely there should have been unit tests.

@SteveL-MSFT Steve Lee (SteveL-MSFT) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we don't have existing tests, I won't block this PR. Based on the discussion of concerns of app compat (even though it was agreed it wouldn't be an issue), it would be nice to have some tests to validate.

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Steve Lee (@SteveL-MSFT) I think we need SDK test set.

@iSazonov
Ilya (iSazonov) merged commit 09f5471 into PowerShell:master Oct 5, 2018
@iSazonov

Copy link
Copy Markdown
Collaborator Author

Aaron Roney (@twitchax) Could you please check that the change works as expected and we haven't regression?

@iSazonov
Ilya (iSazonov) deleted the use-params-in-importpsmodule branch October 5, 2018 04:32
@twitchax

Copy link
Copy Markdown

Awesome. It looks good to me. :)

@iSazonov

Copy link
Copy Markdown
Collaborator Author

Aaron Roney (@twitchax) Can you confirm that you can compile your code after the change?

@twitchax

Copy link
Copy Markdown

Yeah: totally fine.

Aditya Patwardhan (adityapatwardhan) pushed a commit to adityapatwardhan/PowerShell that referenced this pull request Apr 9, 2019
Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ImportPSModule on InitialSessionState should be params.

3 participants