Powershell: Duplicate ExperimentalFeatures entries in powershell.config.json

Created on 20 Aug 2020  路  8Comments  路  Source: PowerShell/PowerShell

Steps to reproduce

Download powershell-7.1.0-preview.6-linux-x64.tar.gz
Open powershell.config.json in text editor

Expected behavior

Each ExperimentalFeature is mentioned once.

Actual behavior

There are duplicate entries for:
"Microsoft.PowerShell.Utility.PSManageBreakpointsInRunspace",
and
"PSDesiredStateConfiguration.InvokeDscResource"

ExpFeatureDupEntries

Environment data

Name                           Value
----                           -----
PSVersion                      7.1.0-preview.6
PSEdition                      Core
GitCommitId                    7.1.0-preview.6
OS                             Linux 5.4.0-42-generic #46~18.04.1-Ubuntu SMP Fri Jul 10 07:21:24 UTC 2020
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
Area-Maintainers-Build Issue-Bug

Most helpful comment

@rjmholt It's an artifact generated at build time, at the end of Start-PSBuild.

@MaximoTrinidad I guess duplicates are tolerated.

All 8 comments

/cc @TravisEz13 @adityapatwardhan @rjmholt This is bizarre. Any of you know what might go wrong?

Is this a static asset generated by the build, or something PowerShell creates when it first starts?

Interesting!

But it doesn't show the duplicates when executing the "Get-ExperimentalFeatures" cmdlet.

expfeaCmdlet_01_2020-08-20_17-20-01

@rjmholt It's an artifact generated at build time, at the end of Start-PSBuild.

@MaximoTrinidad I guess duplicates are tolerated.

If duplicates are tolerated, this seems like a superficial bug. I've moved to future.

10550 for reference.

I see the same in Windows zip package.

I guess at release build time we have extra paths to these modules and follow method enumerates its twice:
https://github.com/PowerShell/PowerShell/blob/b1e998046e12ebe5da9dee479f20d479aa2256d7/src/System.Management.Automation/engine/ExperimentalFeature/GetExperimentalFeatureCommand.cs#L81-L84

That is probably a slightly worse, separate, bug. Although, that bug may be the root cause of this one.

Was this page helpful?
0 / 5 - 0 ratings