You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enable loading of Feedback providers via config #25115
Some native commands may want to participate by providing a Feedback provider, but not want to craft a whole module just for it. Tools today modify the user's $profile during app install and can be tricky to remove correctly during uninstall.
The system config.json would be the default and users can override with their own config.json (setting Enabled: false).
Feedback providers loaded on startup via this method would need to have some message shown to inform the user.
One problem is that new installs of PS7 have a default system config.json which would clobber the old one. Perhaps instead we should have the system one under ProgramData (on Windows) which would be the one apps can modify for install/uninstall.
Asking each tool to update a config.json file -- would that be the same as asking tools to update the profile? All tools still need to change a file to add/remove a section, and they will need to get permission from user first before doing it because no one wants the PowerShell startup suddenly slows down without knowing why (I installed miniconda on my personal computer recently which adds a allUsers profile that slows down PowerShell startup. It took me sometime to figure out why PS suddenly slows down).
Ideally, the loading of a feedback provider should be lazy, which only happens when the native command run fails. I like the directory mechanism used on Linux better but need to think about how to use that for feedback provider loading.
Why really invent something if there is already a module mechanism? All you need is a contract on how to find them (by specific name format or a flag in manifest) and download them automatically at the right time.
Updating a json file (which is structured) isn't the same as adding/removing lines from $profile which is a script.
Ilya (@iSazonov) , rhubarb-geek-nz the intent is to enable apps/tools that DON'T have a PowerShell module, they are native commands that want PowerShell integration. We have some partners asking for this, so this isn't a hypothetical situation.
The directory mechanism means you would still need some config for the user to indicate they DON'T want auto-loading of some extensions.
@iSazonov , @rhubarb-geek-nz the intent is to enable apps/tools that DON'T have a PowerShell module, they are native commands that want PowerShell integration. We have some partners asking for this, so this isn't a hypothetical situation.
Thanks for clarify! Although there is still little information to understand their request. When I think of a native app, I imagine that it uses the SDK. Then why bother with the config at all - rather, you need a public API to discover and manage the providers. In this case, if the config is needed, then the application itself, but not for pwsh.
the intent is to enable apps/tools that DON'T have a PowerShell module, they are native commands that want PowerShell integration. We have some partners asking for this, so this isn't a hypothetical situation.
The directory mechanism doesn't necessarily require a module to be present. The configuration in the directory of a specific tool just need to indicate where to find the provider -- it could be from a module, or from an assembly (which may just be deployed in that directory).
The directory mechanism means you would still need some config for the user to indicate they DON'T want auto-loading of some extensions.
No matter it's the PowerShell config file or the directory mechanism, the installation always needs to get permission from user before making the change. For the directory approach, we can define a key in the configuration of each directory to control whether it's disabled. The benefits of the directory mechanism are:
Lazy loading
Take effect right after the installation of the tool thanks to the lazy loading.
Safer update and cleanup -- different tools operating on different directories/files.
Activity
SteveL-MSFT commentedon Mar 2, 2025
cc Steven Bucher (@StevenBucher98) , Dongbo Wang (@daxian-dbw)
daxian-dbw commentedon Mar 3, 2025
Asking each tool to update a config.json file -- would that be the same as asking tools to update the profile? All tools still need to change a file to add/remove a section, and they will need to get permission from user first before doing it because no one wants the PowerShell startup suddenly slows down without knowing why (I installed
minicondaon my personal computer recently which adds aallUsersprofile that slows down PowerShell startup. It took me sometime to figure out why PS suddenly slows down).Ideally, the loading of a feedback provider should be lazy, which only happens when the native command run fails. I like the directory mechanism used on Linux better but need to think about how to use that for feedback provider loading.
iSazonov commentedon Mar 3, 2025
Why really invent something if there is already a module mechanism? All you need is a contract on how to find them (by specific name format or a flag in manifest) and download them automatically at the right time.
SteveL-MSFT commentedon Mar 3, 2025
Updating a json file (which is structured) isn't the same as adding/removing lines from
$profilewhich is a script.Ilya (@iSazonov) , rhubarb-geek-nz the intent is to enable apps/tools that DON'T have a PowerShell module, they are native commands that want PowerShell integration. We have some partners asking for this, so this isn't a hypothetical situation.
The directory mechanism means you would still need some config for the user to indicate they DON'T want auto-loading of some extensions.
iSazonov commentedon Mar 4, 2025
Thanks for clarify! Although there is still little information to understand their request. When I think of a native app, I imagine that it uses the SDK. Then why bother with the config at all - rather, you need a public API to discover and manage the providers. In this case, if the config is needed, then the application itself, but not for pwsh.
daxian-dbw commentedon Mar 6, 2025
The directory mechanism doesn't necessarily require a module to be present. The configuration in the directory of a specific tool just need to indicate where to find the provider -- it could be from a module, or from an assembly (which may just be deployed in that directory).
No matter it's the PowerShell config file or the directory mechanism, the installation always needs to get permission from user before making the change. For the directory approach, we can define a key in the configuration of each directory to control whether it's disabled. The benefits of the directory mechanism are:
daxian-dbw commentedon Mar 19, 2025
Steve Lee (@SteveL-MSFT) I submitted a draft spec for auto-discovering feedback providers and tab-completers: PowerShell/PowerShell-RFC#386
theJasonHelmick commentedon May 14, 2025
Thank you Steve Lee (@SteveL-MSFT) for this issue. The WG interactive has reviewed this and prefers the alternative mini-spec from Dongbo Wang (@daxian-dbw) and would like to see that move forward. spec: PowerShell/PowerShell-RFC#386
microsoft-github-policy-service commentedon May 16, 2025
This issue has been marked as declined and has not had any activity for 1 day. It has been closed for housekeeping purposes.
microsoft-github-policy-service commentedon May 16, 2025
📣 Hey @Steve Lee (@SteveL-MSFT), how did we do? We would love to hear your feedback with the link below! 🗣️
🔗 https://aka.ms/PSRepoFeedback