Skip to content

Commit 2a83a4b

Browse files
authored
Add the property 'IsEnabled' to ExperimentalFeature type (#2)
'Get-ExperimentalFeature' returns the available 'ExperimentalFeature' instances. For the experimental features that are enabled, the property 'IsEnabled' should be set to true accordingly.
1 parent 1a3d4df commit 2a83a4b

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

2-Draft-Accepted/RFCNNNN-Support-Experimental-Features.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@ public class ExperimentalFeature
362362
public string Description { get; }
363363
// Feature source (e.g. PSEngine, or module name)
364364
public string Source { get; }
365+
// Feature is enabled or not
366+
public bool IsEnabled { get; }
365367
}
366368

367369
internal static readonly ReadOnlyCollection<ExperimentalFeature> EngineExperimentalFeatures;
@@ -403,6 +405,9 @@ Lastly, the cmdlet can go through not-yet-loaded modules that are in the module
403405
in a similar way as `Get-Command` does,
404406
with the help of the module analysis code.
405407

408+
For the experimental features that are enabled,
409+
the property `IsEnabled` will be set to `true` accordingly.
410+
406411
### Experimental Feature Dependencies
407412

408413
An experimental feature in a module can depend on another experimental feature.
@@ -467,6 +472,8 @@ public class ExperimentalFeature
467472
public string Description { get; }
468473
// Feature source (e.g. module name)
469474
public string Source { get; }
475+
// Feature is enabled or not
476+
public bool IsEnabled { get; }
470477
// Features it depends on
471478
public ExperimentalFeature[] Dependency { get; }
472479
}
@@ -593,7 +600,7 @@ There are two proposals here for solving this problem:
593600
The first pass is to convert the arguments into a more structured format,
594601
and process flags like `-settingsFile` at a very early stage.
595602
The second pass is the main parsing logic.
596-
1. Use an environment variable `PSSettingsFile` to point to the configuration file to use.
603+
2. Use an environment variable `PSSettingsFile` to point to the configuration file to use.
597604
By using the environment variable,
598605
overriding the instance configuration file can happen as early as the singleton instance of `PowerShellConfig` gets created,
599606
which would be the first time PowerShell attempts to read the configuration file.

0 commit comments

Comments
 (0)