Refactor Import-Module part of the codebase
After speaking with @rjmholt I've learned that the Import-Module part of the codebase has gotten rather complex and needs to be refactored. However, due to numerous subtleties in how Import-Module works we need to achieve much better testing coverage of Import-Module before work can be done to refactor.
For some context the following PR is what is leading me to create this issue as I noticed some odd behavior which is described in the comments : #8758
I'm opening this meta issue to track ongoing work relating to this refactoring and hopefully it can lead to useful discussions. I will also use it to add my own insights, ideas and questions as I dive into it.
Refactor Import-Module part of the codebase
After speaking with @rjmholt I've learned that the Import-Module part of the codebase has gotten rather complex and needs to be refactored. However, due to numerous subtleties in how Import-Module works we need to achieve much better testing coverage of Import-Module before work can be done to refactor.
For some context the following PR is what is leading me to create this issue as I noticed some odd behavior which is described in the comments : #8758
I'm opening this meta issue to track ongoing work relating to this refactoring and hopefully it can lead to useful discussions. I will also use it to add my own insights, ideas and questions as I dive into it.