[PSS 2015] Add Custom Module Paths for Primal Sense

Post feature requests, product enhancement ideas, and other product-specific suggestions here. Do not post bug reports.
Forum rules
Do not post any licensing information in this forum.
This topic is 8 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

[PSS 2015] Add Custom Module Paths for Primal Sense

Post by Bosparan »

Hi Sapien Team,

another feature request has come up:

Description
I'd like to be able to specify additional paths for where PowerShell Studio looks for modules. For each path I'd assign a numerical weight, in case the same module is available in multiple paths (including the default ones). This way I can choose which Module Version to provide Primal Sense for.
The default Module paths ($env:PSModulePath) are automatically added with default weight 0.

Example
Paths:
a) | C:\Users\UserName\Documents\WindowsPowerShell\Modules | Weight 1 (Added by default, manually changed weight)
b) | C:\Program Files\WindowsPowerShell\Modules | Weight 0 (Added by default)
c) | C:\Windows\system32\WindowsPowerShell\v1.0\Modules | Weight 0 (Added by default)
d) | \\srv-dev\Modules | Weight 2 (Added manually)
e) | \\srv-dev\Modules_Alpha | Weight 3 (Added manually)

Modules:
ModuleA (Found in Paths: a), d), e) )
ModuleB (Found in Paths: a), b), d) )

Received Primal Sense from
ModuleA --> Path e)
ModuleB --> Path d)

Use Case
We have a project involving multiple developers, source code control softwares and development computers. It consists of multiple PowerShell Modules (currently 5, but according to the design plan it will end up with 12). It is not practical to mirror them into default folders for each dev, as some modules in alpha stages will break the help system of powershell if present in a folder where powershell can find it. Furthermore, it simply adds a complexity that is not desired.
Being able to manually configure the folders used for Primal Sense for PSS only would solve this issue handily, and a priority system (like the weight numbers described in the example) allows controlling what Version of the same module Primal Sense is provided for (So I can have the last stable build for use in the console and receive Primal Sense for the Alpha of the latest version).

Expected usefulness in general
- Allows better coexistence between development builds and production deployments of modules.
- Simpler collaboration during multi-module development

Cheers,
Bosparan
User avatar
davidc
Posts: 5913
Last visit: Mon Jul 08, 2019 8:55 am
Been upvoted: 2 times

Re: [PSS 2015] Add Custom Module Paths for Primal Sense

Post by davidc »

Caching modules outside of the PSModulePath is on our wish list.

Note: With PowerShell v5 you can specify which version of the module you wish to load using the FullyQualifiedName parameter (Assuming they have different version numbers).

Thank you for your feedback.

David
David
SAPIEN Technologies, Inc.
Bosparan
Posts: 290
Last visit: Fri Oct 08, 2021 11:59 am

Re: [PSS 2015] Add Custom Module Paths for Primal Sense

Post by Bosparan »

Hi David,

nice to see it on the wishlist - especially considering we're approaching the time of year where wishes sometimes come true ^^
davidc wrote:Note: With PowerShell v5 you can specify which version of the module you wish to load using the FullyQualifiedName parameter (Assuming they have different version numbers).
Aye, however in my current use-case that's a no-go - v4 is all we can use. Unfortunately I wouldn't want to rely on all devs maintaining correct Versioning for anything but production builds.

Cheers,
Bosparan
This topic is 8 years and 3 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked