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
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 1250cea7252e45de242063668469b75ff7618ee0 Mon Sep 17 00:00:00 2001
From: Andy Zivkovic <[email protected]>
Date: Thu, 27 Nov 2025 10:42:15 +1030
Subject: [PATCH] Remove PolySharp

---
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 5a9e161..991c064 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.43.0

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 e09728
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>4.0.1</PackageVersion>
<AssemblyName>Wcwidth.Sources</AssemblyName>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
namespace Wcwidth;

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

public static int Find(this int[,] table, int 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;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

using System;

namespace Wcwidth;

internal static partial class Vs16Table
{
private static int[,] GenerateTable(Unicode version)
{
return version switch
{
Unicode.Version_9_0_0 => Unicode_9_0_0(),
_ => throw new InvalidOperationException("Unknown Unicode version"),
};
}

private static int[,] Unicode_9_0_0()
{
return new int[,]
{
{ 0x000023, 0x000023 },
{ 0x00002A, 0x00002A },
{ 0x000030, 0x000039 },
{ 0x0000A9, 0x0000A9 },
{ 0x0000AE, 0x0000AE },
{ 0x00203C, 0x00203C },
{ 0x002049, 0x002049 },
{ 0x002122, 0x002122 },
{ 0x002139, 0x002139 },
{ 0x002194, 0x002199 },
{ 0x0021A9, 0x0021AA },
{ 0x002328, 0x002328 },
{ 0x0023CF, 0x0023CF },
{ 0x0023ED, 0x0023EF },
{ 0x0023F1, 0x0023F2 },
{ 0x0023F8, 0x0023FA },
{ 0x0024C2, 0x0024C2 },
{ 0x0025AA, 0x0025AB },
{ 0x0025B6, 0x0025B6 },
{ 0x0025C0, 0x0025C0 },
{ 0x0025FB, 0x0025FC },
{ 0x002600, 0x002604 },
{ 0x00260E, 0x00260E },
{ 0x002611, 0x002611 },
{ 0x002618, 0x002618 },
{ 0x00261D, 0x00261D },
{ 0x002620, 0x002620 },
{ 0x002622, 0x002623 },
{ 0x002626, 0x002626 },
{ 0x00262A, 0x00262A },
{ 0x00262E, 0x00262F },
{ 0x002638, 0x00263A },
{ 0x002640, 0x002640 },
{ 0x002642, 0x002642 },
{ 0x00265F, 0x002660 },
{ 0x002663, 0x002663 },
{ 0x002665, 0x002666 },
{ 0x002668, 0x002668 },
{ 0x00267B, 0x00267B },
{ 0x00267E, 0x00267E },
{ 0x002692, 0x002692 },
{ 0x002694, 0x002697 },
{ 0x002699, 0x002699 },
{ 0x00269B, 0x00269C },
{ 0x0026A0, 0x0026A0 },
{ 0x0026A7, 0x0026A7 },
{ 0x0026B0, 0x0026B1 },
{ 0x0026C8, 0x0026C8 },
{ 0x0026CF, 0x0026CF },
{ 0x0026D1, 0x0026D1 },
{ 0x0026D3, 0x0026D3 },
{ 0x0026E9, 0x0026E9 },
{ 0x0026F0, 0x0026F1 },
{ 0x0026F4, 0x0026F4 },
{ 0x0026F7, 0x0026F9 },
{ 0x002702, 0x002702 },
{ 0x002708, 0x002709 },
{ 0x00270C, 0x00270D },
{ 0x00270F, 0x00270F },
{ 0x002712, 0x002712 },
{ 0x002714, 0x002714 },
{ 0x002716, 0x002716 },
{ 0x00271D, 0x00271D },
{ 0x002721, 0x002721 },
{ 0x002733, 0x002734 },
{ 0x002744, 0x002744 },
{ 0x002747, 0x002747 },
{ 0x002763, 0x002764 },
{ 0x0027A1, 0x0027A1 },
{ 0x002934, 0x002935 },
{ 0x002B05, 0x002B07 },
{ 0x01F170, 0x01F171 },
{ 0x01F17E, 0x01F17F },
{ 0x01F321, 0x01F321 },
{ 0x01F324, 0x01F32C },
{ 0x01F336, 0x01F336 },
{ 0x01F37D, 0x01F37D },
{ 0x01F396, 0x01F397 },
{ 0x01F399, 0x01F39B },
{ 0x01F39E, 0x01F39F },
{ 0x01F3CB, 0x01F3CE },
{ 0x01F3D4, 0x01F3DF },
{ 0x01F3F3, 0x01F3F3 },
{ 0x01F3F5, 0x01F3F5 },
{ 0x01F3F7, 0x01F3F7 },
{ 0x01F43F, 0x01F43F },
{ 0x01F441, 0x01F441 },
{ 0x01F4FD, 0x01F4FD },
{ 0x01F549, 0x01F54A },
{ 0x01F56F, 0x01F570 },
{ 0x01F573, 0x01F579 },
{ 0x01F587, 0x01F587 },
{ 0x01F58A, 0x01F58D },
{ 0x01F590, 0x01F590 },
{ 0x01F5A5, 0x01F5A5 },
{ 0x01F5A8, 0x01F5A8 },
{ 0x01F5B1, 0x01F5B2 },
{ 0x01F5BC, 0x01F5BC },
{ 0x01F5C2, 0x01F5C4 },
{ 0x01F5D1, 0x01F5D3 },
{ 0x01F5DC, 0x01F5DE },
{ 0x01F5E1, 0x01F5E1 },
{ 0x01F5E3, 0x01F5E3 },
{ 0x01F5E8, 0x01F5E8 },
{ 0x01F5EF, 0x01F5EF },
{ 0x01F5F3, 0x01F5F3 },
{ 0x01F5FA, 0x01F5FA },
{ 0x01F6CB, 0x01F6CB },
{ 0x01F6CD, 0x01F6CF },
{ 0x01F6E0, 0x01F6E5 },
{ 0x01F6E9, 0x01F6E9 },
{ 0x01F6F0, 0x01F6F0 },
{ 0x01F6F3, 0x01F6F3 },
};
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#if WCWIDTH
#pragma warning restore
#else
#pragma warning disable
#endif

namespace Wcwidth;

internal static partial class Vs16Table
{
private static readonly Dictionary<Unicode, int[,]> _lookup;
private static readonly object _lock;

static Vs16Table()
{
_lookup = new Dictionary<Unicode, int[,]>();
_lock = new object();
}

public static int[,] GetTable(Unicode version)
{
if (!_lookup.TryGetValue(version, out var table))
{
lock (_lock)
{
if (_lookup.TryGetValue(version, out table))
{
return table;
}

// Generate the table for the version dynamically
// since we don't want to load everything into memory.
table = GenerateTable(version);
_lookup[version] = table;
}
}

return table;
}
}
Loading