question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Maintain user-level experimental-feature configuration separately for preview and stable versions

See original GitHub issue

Related: #14862

Summary of the new feature/enhancement

Currently, selective enabling or disabling experimental features at the user level (-Scope CurrentUser, which is the default) takes effect for all side-by-side PowerShell (Core) installations, irrespective of whether they’re stable versions or preview versions.

This can unwittingly result in the following scenario:

  • By selectively disabling an experimental feature in a preview version, you’re implicitly enabling experimental features for side-by-side stable versions, because the same powershell.config.json file is used by all side-by-side version, and because disabling is based on excluding the disabled feature from the list of explicitly enumerated enabled features in that file (based on the all-enabled starting point in preview versions).

The state of experimental features for preview versions should be managed separately from stable versions.


An additional question is how to handle cross-preview-version configuration:

  • Say you disable an experimental feature in a preview version (where all features are enabled by default).

  • You later install a new preview version that comes with new experimental features.

  • With a version-agnostic configuration, it isn’t just the previously explicitly disabled feature that ends up disabled, but all newly added ones as well.

Proposed implementation:

Introduce a new property in the user-level powershell.config.json file:

  • named something like DisabledPreviewExperimentalFeatures, which is only read by preview versions, instead of the ExperimentalFeatures property.

  • whose logic is the inverse of ExperimentalFeatures: all features except the ones listed should then be enabled.

Written as of PowerShell Core 7.2.0-preview.3

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
daxian-dbwcommented, Apr 6, 2022

The current-user scope configuration file doesn’t come with PowerShell package. It’s created by user (explicitly, or via Enable-ExperimentalFeature command), so I don’t think this will affect MU.

1reaction
daxian-dbwcommented, Apr 5, 2022

@doctordns Consider there may be non-PowerShell-built-in modules in the module path that define experimental features, it’s not possible to list all experimental features until at PowerShell run time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Show what experimental features are turned on at the start ...
The OP argues specific points, separately for stable and preview versions, including the point that in stable versions you normally wouldn't see additional ......
Read more >
WinGet Configuration
To use the winget configure command, you must be running the preview version of Windows Package Manager and must first enable the Experimental...
Read more >
What's New in TeamCity 2019.2
You can separately browse user and artifact changes, and optionally display changes in build settings. Click any change to preview its details.
Read more >
Google Cloud release notes | Documentation
Multi-turn, conversational search from within the Google Cloud console is available in preview. For information, see Configure search results for ...
Read more >
Changelog
Site config has a new experimental feature called gitServerPinnedRepos that allows admins to pin specific repositories to particular gitserver instances. #32831 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found