Skip to content

Better resolution of file system modules in Get-Module – Chapter 2 - #27848

Draft
Guillermo López-Anglada (guillermooo) wants to merge 116 commits into
PowerShell:masterfrom
guillermooo:users/guillermo/bugfix/better-fs-module-resolution-chapter-2
Draft

Better resolution of file system modules in Get-Module – Chapter 2#27848
Guillermo López-Anglada (guillermooo) wants to merge 116 commits into
PowerShell:masterfrom
guillermooo:users/guillermo/bugfix/better-fs-module-resolution-chapter-2

Conversation

@guillermooo

@guillermooo Guillermo López-Anglada (guillermooo) commented Aug 13, 2026

Copy link
Copy Markdown

PR Summary

In which a new path resolution API is introduced that behaves like the old one but perhaps is simpler and better documented.

PR Context

The code base before this PR uses disparate APIs for path resolution, and there are comments suggesting that there is no common approach. I think this contributes to inconsistent behavior when performing module resolution in Get-Module.

First, two new methods have been added:

  • ResolveToFileSystemPathsThrowing()
  • TryResolveToFileSystemPaths()

These encapsulate all main existing path resolution behaviors.

Then, existing methods are implemented in terms of the new APIs above, and renamed to follow a more homogeneous pattern. Documentation has been improved in some places.

Important

These changes should be pure refactors and not alter existing behavior at all.

The new behavior can be verified with the available test suite (see Chapter 1), but it's unclear whether the test suite is comprehensive enough.

This is the full series of changes:

PR Checklist

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@guillermooo Guillermo López-Anglada (guillermooo) changed the title Better resolution of file system modules in Get-Module – Chapter 2 Better resolution of file system modules in Get-Module – Chapter 2 Aug 13, 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.

1 participant