Skip to content

Commit

Permalink
Remove PowerShellEditorServices.VSCode module / ContentViews feature
Browse files Browse the repository at this point in the history
As it took a year (presumably, maybe a more recent VS Code update is
what broke it) to come up that indicates its usage is too low for us to
go about fixing. If someone wants to figure it out we'll be happy to
take a PR. For now we're removing the code (which is also a massive
simplification because it was the entirety of the "VSCode" module we had
to build and ship with the extension).
  • Loading branch information
andyleejordan committed Jan 25, 2024
1 parent 6cffb4a commit 40126f9
Show file tree
Hide file tree
Showing 27 changed files with 2 additions and 1,796 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ PowerShellEditorServices.sln.ide/storage.ide

# Don't include PlatyPS generated MAML
module/PowerShellEditorServices/Commands/en-US/*-help.xml
module/PowerShellEditorServices.VSCode/en-US/*-help.xml

# Don't include Third Party Notices in module folder
module/PowerShellEditorServices/Third\ Party\ Notices.txt
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci/templates/ci-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ steps:
targetType: inline
pwsh: true
script: |
$assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll")
$assembly = [Reflection.Assembly]::LoadFile("$(Build.SourcesDirectory)/module/PowerShellEditorServices/bin/Core/Microsoft.PowerShell.EditorServices.Hosting.dll")
if ($assembly.GetCustomAttributes([System.Diagnostics.DebuggableAttribute], $true).IsJITOptimizerDisabled) {
Write-Host "##vso[task.LogIssue type=error;] PowerShell Editor Services bits were not built in release configuration!"
exit 1
Expand Down
4 changes: 0 additions & 4 deletions .vsts-ci/templates/release-general.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ steps:
PowerShellEditorServices/Commands/**/*.{ps1,psd1,psm1,ps1xml}
# PowerShellEditorServices Binaries
PowerShellEditorServices/**/Microsoft.PowerShell.EditorServices*.dll
# PowerShellEditorServices.VSCode Script
PowerShellEditorServices.VSCode/PowerShellEditorServices.VSCode.psd1
# PowerShellEditorServices.VSCode Binary
PowerShellEditorServices.VSCode/bin/Microsoft.PowerShell.EditorServices.VSCode.dll
- template: EsrpSign.yml@ComplianceRepo
parameters:
Expand Down
16 changes: 1 addition & 15 deletions PowerShellEditorServices.build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ $script:NetFramework = @{
$script:HostCoreOutput = "$PSScriptRoot/src/PowerShellEditorServices.Hosting/bin/$Configuration/$($script:NetFramework.PS72)/publish"
$script:HostDeskOutput = "$PSScriptRoot/src/PowerShellEditorServices.Hosting/bin/$Configuration/$($script:NetFramework.PS51)/publish"
$script:PsesOutput = "$PSScriptRoot/src/PowerShellEditorServices/bin/$Configuration/$($script:NetFramework.Standard)/publish"
$script:VSCodeOutput = "$PSScriptRoot/src/PowerShellEditorServices.VSCode/bin/$Configuration/$($script:NetFramework.Standard)/publish"

if (Get-Command git -ErrorAction SilentlyContinue) {
# ignore changes to this file
Expand All @@ -79,7 +78,6 @@ Task FindDotNet {
Task BinClean {
Remove-BuildItem $PSScriptRoot\.tmp
Remove-BuildItem $PSScriptRoot\module\PowerShellEditorServices\bin
Remove-BuildItem $PSScriptRoot\module\PowerShellEditorServices.VSCode\bin
}

Task Clean FindDotNet, BinClean, {
Expand Down Expand Up @@ -170,9 +168,6 @@ Task Build FindDotNet, CreateBuildInfo, {
if (-not $script:IsNix) {
Invoke-BuildExec { & dotnet publish $script:dotnetBuildArgs .\src\PowerShellEditorServices.Hosting\PowerShellEditorServices.Hosting.csproj -f $script:NetFramework.PS51 }
}

# Build PowerShellEditorServices.VSCode module
Invoke-BuildExec { & dotnet publish $script:dotnetBuildArgs .\src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj -f $script:NetFramework.Standard }
}

# The concise set of tests (for pull requests)
Expand Down Expand Up @@ -291,14 +286,13 @@ Task TestE2EPowerShellCLM -If (-not $script:IsNix) Build, SetupHelpForTests, {

Task LayoutModule -After Build {
$modulesDir = "$PSScriptRoot/module"
$psesVSCodeBinOutputPath = "$modulesDir/PowerShellEditorServices.VSCode/bin"
$psesOutputPath = "$modulesDir/PowerShellEditorServices"
$psesBinOutputPath = "$PSScriptRoot/module/PowerShellEditorServices/bin"
$psesDepsPath = "$psesBinOutputPath/Common"
$psesCoreHostPath = "$psesBinOutputPath/Core"
$psesDeskHostPath = "$psesBinOutputPath/Desktop"

foreach ($dir in $psesDepsPath, $psesCoreHostPath, $psesDeskHostPath, $psesVSCodeBinOutputPath) {
foreach ($dir in $psesDepsPath, $psesCoreHostPath, $psesDeskHostPath) {
New-Item -Force -Path $dir -ItemType Directory | Out-Null
}

Expand Down Expand Up @@ -338,13 +332,6 @@ Task LayoutModule -After Build {
}
}
}

# Assemble the PowerShellEditorServices.VSCode module
foreach ($vscodeComponent in Get-ChildItem $script:VSCodeOutput) {
if (-not $includedDlls.Contains($vscodeComponent.Name)) {
Copy-Item -Path $vscodeComponent.FullName -Destination $psesVSCodeBinOutputPath -Force
}
}
}

task RestorePsesModules -After Build {
Expand Down Expand Up @@ -400,7 +387,6 @@ task RestorePsesModules -After Build {

Task BuildCmdletHelp -After LayoutModule {
New-ExternalHelp -Path $PSScriptRoot\module\docs -OutputPath $PSScriptRoot\module\PowerShellEditorServices\Commands\en-US -Force | Out-Null
New-ExternalHelp -Path $PSScriptRoot\module\PowerShellEditorServices.VSCode\docs -OutputPath $PSScriptRoot\module\PowerShellEditorServices.VSCode\en-US -Force | Out-Null
}

# The default task is to run the entire CI build
Expand Down
2 changes: 0 additions & 2 deletions PowerShellEditorServices.sln
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "scripts", "scripts", "{E231
scripts\AddCopyrightHeaders.ps1 = scripts\AddCopyrightHeaders.ps1
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerShellEditorServices.VSCode", "src\PowerShellEditorServices.VSCode\PowerShellEditorServices.VSCode.csproj", "{3B38E8DA-8BFF-4264-AF16-47929E6398A3}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerShellEditorServices", "src\PowerShellEditorServices\PowerShellEditorServices.csproj", "{29EEDF03-0990-45F4-846E-2616970D1FA2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "PowerShellEditorServices.Test.E2E", "test\PowerShellEditorServices.Test.E2E\PowerShellEditorServices.Test.E2E.csproj", "{2561F253-8F72-436A-BCC3-AA63AB82EDC0}"
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 40126f9

Please sign in to comment.