Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@
[submodule "vs-solutionpersistence"]
path = src/externalPackages/src/vs-solutionpersistence
url = https://github.com/microsoft/vs-solutionpersistence.git
[submodule "spectre-console"]
path = src/externalPackages/src/spectre-console
url = https://github.com/spectreconsole/spectre.console
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<HumanizerReleaseVersion>2.14.1</HumanizerReleaseVersion>
<MSBuildLocatorReleaseVersion>1.10.2</MSBuildLocatorReleaseVersion>
<SolutionPersistenceVersion>1.0.52</SolutionPersistenceVersion>
<SpectreConsoleReleaseVersion>0.52.0</SpectreConsoleReleaseVersion>
</PropertyGroup>
<PropertyGroup>
<!-- NuGet dependencies -->
Expand Down
2 changes: 1 addition & 1 deletion eng/common/vmr-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ set -e
highlight 'Installing .NET, preparing the tooling..'
source "./eng/common/tools.sh"
InitializeDotNetCli true
GetDarc
GetDarc "1.1.0-beta.25514.2"
dotnetDir=$( cd ./.dotnet/; pwd -P )
dotnet=$dotnetDir/dotnet

Expand Down
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maintaining patches is non-trivial. As a follow-up I propose opening a issue/PR against Spectre.Console to see if they would be accepting of adding an msbuild property to condition this reference in order to eliminate the need for this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like they would only need PolySharp for the netstandard2.0 target framework, and we don't even build that?

I will send a PR to condition it, and see what they say.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From dc5adfd1633f110e26c02693ca0b84b2e4c26a30 Mon Sep 17 00:00:00 2001
From: Jonathan Peppers <jonathan.peppers@gmail.com>
Date: Wed, 29 Oct 2025 21:19:22 +0000
Subject: [PATCH] Remove PolySharp

PolySharp is not available in source-build environments.
---
src/Spectre.Console/Spectre.Console.csproj | 4 ----
1 file changed, 4 deletions(-)

diff --git a/src/Spectre.Console/Spectre.Console.csproj b/src/Spectre.Console/Spectre.Console.csproj
index bb56ec6..ddfa90e 100644
--- a/src/Spectre.Console/Spectre.Console.csproj
+++ b/src/Spectre.Console/Spectre.Console.csproj
@@ -22,10 +22,6 @@
<PackageReference Include="Wcwidth.Sources">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
- <PackageReference Include="PolySharp">
- <PrivateAssets>all</PrivateAssets>
- <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
- </PackageReference>
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
--
2.47.3

39 changes: 39 additions & 0 deletions src/externalPackages/projects/spectre-console.proj
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<Project Sdk="Microsoft.Build.NoTargets">

<PropertyGroup>
<PackagesOutput>$(ProjectDirectory)src/Spectre.Console/bin/$(Configuration)/</PackagesOutput>
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
<CustomRepoBuild>true</CustomRepoBuild>
</PropertyGroup>

<Target Name="CustomRepoBuild">
<PropertyGroup>
<BuildCommandArgs>$(ProjectDirectory)src/Spectre.Console/Spectre.Console.csproj</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:Configuration=$(Configuration)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:DelaySign=$(DelaySign)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:PublicSign=$(PublicSign)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /v:$(LogVerbosity)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) $(RedirectRepoOutputToLog)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:Version=$(SpectreConsoleReleaseVersion)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:TargetFrameworks=$(NetCurrent)</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:UseBuildTimeTools=false</BuildCommandArgs>
<BuildCommandArgs>$(BuildCommandArgs) /p:IsAotCompatible=false</BuildCommandArgs>
</PropertyGroup>

<Exec Command="$(DotNetTool) restore /bl:$(ArtifactsLogRepoDir)restore.binlog $(BuildCommandArgs)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />

<Exec Command="$(DotNetTool) build /bl:$(ArtifactsLogRepoDir)build.binlog $(BuildCommandArgs)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />

<Exec Command="$(DotNetTool) pack /bl:$(ArtifactsLogRepoDir)pack.binlog $(BuildCommandArgs)"
EnvironmentVariables="@(EnvironmentVariables)"
WorkingDirectory="$(ProjectDirectory)"
IgnoreStandardErrorWarningFormat="true" />
</Target>

</Project>
1 change: 1 addition & 0 deletions src/externalPackages/src/spectre-console
Submodule spectre-console added at 3c2156
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>netstandard2.0</TargetFrameworks>
<PackageVersion>3.0.0</PackageVersion>
<AssemblyName>Wcwidth.Sources</AssemblyName>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
using System;

namespace Wcwidth
{
internal static class IntegerExtensions
{
public static bool Exist(this uint[,] table, uint value)
{
return Find(table, value) != 0;
}

public static int Find(this uint[,] table, uint value)
{
if (table is null)
{
throw new ArgumentNullException(nameof(table));
}

var min = 0;
var max = table.GetUpperBound(0);
int mid;

if (value < table[0, 0] || value > table[max, 1])
{
return 0;
}

while (max >= min)
{
mid = (min + max) / 2;
if (value > table[mid, 1])
{
min = mid + 1;
}
else if (value < table[mid, 0])
{
max = mid - 1;
}
else
{
return 1;
}
}

return 0;
}
}
}
Loading