Skip to content

Centralize module loading #1520

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

Closed
wants to merge 7 commits into from

Conversation

dkattan
Copy link
Contributor

@dkattan dkattan commented Jul 5, 2021

This builds on top of #1514 and is a pre-requisite for

#1516 and #1507

By centralizing all module loading into PowerShellContextService.cs, we can more easily honor the -BundledModulesPath parameter as we aren't building the relative path to our modules folder in multiple locations. Additionally, since we have all the information we need in PowerShellContextService to determine which modules will be necessary, we can load them all using a method compatible with the runspace, as Import-Module isn't always available and sometimes you need to use initialSessionState.ImportPSModuleFromPath

@dkattan
Copy link
Contributor Author

dkattan commented Jul 6, 2021

Closing as #1516 includes these changes

@dkattan dkattan closed this Jul 6, 2021
@dkattan dkattan reopened this Jul 13, 2021
@dkattan
Copy link
Contributor Author

dkattan commented Jul 13, 2021

Re-opening as #1516 didn't end up centralizing the module loading, just the PSReadLine changes.

@dkattan dkattan marked this pull request as ready for review July 28, 2021 21:26
@dkattan dkattan requested a review from rjmholt as a code owner July 28, 2021 21:26
@dkattan dkattan force-pushed the centralize-module-loading branch from 192d25e to 65ff98d Compare August 4, 2021 18:43
@dkattan dkattan requested a review from andyleejordan as a code owner August 4, 2021 18:43
@dkattan dkattan force-pushed the centralize-module-loading branch from 65ff98d to d1c5e1a Compare August 4, 2021 19:02
@dkattan
Copy link
Contributor Author

dkattan commented Aug 4, 2021

Will resubmit new merge request with squashed commits.

@dkattan dkattan closed this Aug 4, 2021
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.

1 participant