Skip to content

Commit 1a7981f

Browse files
jonathanpeppersjjonesczpremunakoeplinger
authored
Add Spectre.Console 0.52.0 (#1447)
* Add Spectre.Console 0.52.0 (#1287) Context: #1287 * Update spectre-console submodule to 0.52.0 * Add patch file to delete problematic binaries: #1287 (comment) Co-authored-by: Jan Jones <[email protected]> * Remove binary patch again * Pin darc version * Add DelaySign and PublicSign to build arguments --------- Co-authored-by: Jan Jones <[email protected]> Co-authored-by: Premek Vysoky <[email protected]> Co-authored-by: Alexander Köplinger <[email protected]>
1 parent 2f540e9 commit 1a7981f

36 files changed

+32731
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@
2222
[submodule "vs-solutionpersistence"]
2323
path = src/externalPackages/src/vs-solutionpersistence
2424
url = https://github.com/microsoft/vs-solutionpersistence.git
25+
[submodule "spectre-console"]
26+
path = src/externalPackages/src/spectre-console
27+
url = https://github.com/spectreconsole/spectre.console

eng/Versions.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<HumanizerReleaseVersion>2.14.1</HumanizerReleaseVersion>
1616
<MSBuildLocatorReleaseVersion>1.10.2</MSBuildLocatorReleaseVersion>
1717
<SolutionPersistenceVersion>1.0.52</SolutionPersistenceVersion>
18+
<SpectreConsoleReleaseVersion>0.52.0</SpectreConsoleReleaseVersion>
1819
</PropertyGroup>
1920
<PropertyGroup>
2021
<!-- NuGet dependencies -->

eng/common/vmr-sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ set -e
164164
highlight 'Installing .NET, preparing the tooling..'
165165
source "./eng/common/tools.sh"
166166
InitializeDotNetCli true
167-
GetDarc
167+
GetDarc "1.1.0-beta.25514.2"
168168
dotnetDir=$( cd ./.dotnet/; pwd -P )
169169
dotnet=$dotnetDir/dotnet
170170

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
From dc5adfd1633f110e26c02693ca0b84b2e4c26a30 Mon Sep 17 00:00:00 2001
2+
From: Jonathan Peppers <[email protected]>
3+
Date: Wed, 29 Oct 2025 21:19:22 +0000
4+
Subject: [PATCH] Remove PolySharp
5+
6+
PolySharp is not available in source-build environments.
7+
---
8+
src/Spectre.Console/Spectre.Console.csproj | 4 ----
9+
1 file changed, 4 deletions(-)
10+
11+
diff --git a/src/Spectre.Console/Spectre.Console.csproj b/src/Spectre.Console/Spectre.Console.csproj
12+
index bb56ec6..ddfa90e 100644
13+
--- a/src/Spectre.Console/Spectre.Console.csproj
14+
+++ b/src/Spectre.Console/Spectre.Console.csproj
15+
@@ -22,10 +22,6 @@
16+
<PackageReference Include="Wcwidth.Sources">
17+
<PrivateAssets>all</PrivateAssets>
18+
</PackageReference>
19+
- <PackageReference Include="PolySharp">
20+
- <PrivateAssets>all</PrivateAssets>
21+
- <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
22+
- </PackageReference>
23+
</ItemGroup>
24+
25+
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
26+
--
27+
2.47.3
28+
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<Project Sdk="Microsoft.Build.NoTargets">
2+
3+
<PropertyGroup>
4+
<PackagesOutput>$(ProjectDirectory)src/Spectre.Console/bin/$(Configuration)/</PackagesOutput>
5+
<GlobalJsonFile>$(ProjectDirectory)global.json</GlobalJsonFile>
6+
<CustomRepoBuild>true</CustomRepoBuild>
7+
</PropertyGroup>
8+
9+
<Target Name="CustomRepoBuild">
10+
<PropertyGroup>
11+
<BuildCommandArgs>$(ProjectDirectory)src/Spectre.Console/Spectre.Console.csproj</BuildCommandArgs>
12+
<BuildCommandArgs>$(BuildCommandArgs) /p:Configuration=$(Configuration)</BuildCommandArgs>
13+
<BuildCommandArgs>$(BuildCommandArgs) /p:DelaySign=$(DelaySign)</BuildCommandArgs>
14+
<BuildCommandArgs>$(BuildCommandArgs) /p:PublicSign=$(PublicSign)</BuildCommandArgs>
15+
<BuildCommandArgs>$(BuildCommandArgs) /v:$(LogVerbosity)</BuildCommandArgs>
16+
<BuildCommandArgs>$(BuildCommandArgs) $(RedirectRepoOutputToLog)</BuildCommandArgs>
17+
<BuildCommandArgs>$(BuildCommandArgs) /p:Version=$(SpectreConsoleReleaseVersion)</BuildCommandArgs>
18+
<BuildCommandArgs>$(BuildCommandArgs) /p:TargetFrameworks=$(NetCurrent)</BuildCommandArgs>
19+
<BuildCommandArgs>$(BuildCommandArgs) /p:UseBuildTimeTools=false</BuildCommandArgs>
20+
<BuildCommandArgs>$(BuildCommandArgs) /p:IsAotCompatible=false</BuildCommandArgs>
21+
</PropertyGroup>
22+
23+
<Exec Command="$(DotNetTool) restore /bl:$(ArtifactsLogRepoDir)restore.binlog $(BuildCommandArgs)"
24+
EnvironmentVariables="@(EnvironmentVariables)"
25+
WorkingDirectory="$(ProjectDirectory)"
26+
IgnoreStandardErrorWarningFormat="true" />
27+
28+
<Exec Command="$(DotNetTool) build /bl:$(ArtifactsLogRepoDir)build.binlog $(BuildCommandArgs)"
29+
EnvironmentVariables="@(EnvironmentVariables)"
30+
WorkingDirectory="$(ProjectDirectory)"
31+
IgnoreStandardErrorWarningFormat="true" />
32+
33+
<Exec Command="$(DotNetTool) pack /bl:$(ArtifactsLogRepoDir)pack.binlog $(BuildCommandArgs)"
34+
EnvironmentVariables="@(EnvironmentVariables)"
35+
WorkingDirectory="$(ProjectDirectory)"
36+
IgnoreStandardErrorWarningFormat="true" />
37+
</Target>
38+
39+
</Project>
Submodule spectre-console added at 3c21562
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>netstandard2.0</TargetFrameworks>
5+
<PackageVersion>3.0.0</PackageVersion>
6+
<AssemblyName>Wcwidth.Sources</AssemblyName>
7+
</PropertyGroup>
8+
9+
</Project>
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
using System;
2+
3+
namespace Wcwidth
4+
{
5+
internal static class IntegerExtensions
6+
{
7+
public static bool Exist(this uint[,] table, uint value)
8+
{
9+
return Find(table, value) != 0;
10+
}
11+
12+
public static int Find(this uint[,] table, uint value)
13+
{
14+
if (table is null)
15+
{
16+
throw new ArgumentNullException(nameof(table));
17+
}
18+
19+
var min = 0;
20+
var max = table.GetUpperBound(0);
21+
int mid;
22+
23+
if (value < table[0, 0] || value > table[max, 1])
24+
{
25+
return 0;
26+
}
27+
28+
while (max >= min)
29+
{
30+
mid = (min + max) / 2;
31+
if (value > table[mid, 1])
32+
{
33+
min = mid + 1;
34+
}
35+
else if (value < table[mid, 0])
36+
{
37+
max = mid - 1;
38+
}
39+
else
40+
{
41+
return 1;
42+
}
43+
}
44+
45+
return 0;
46+
}
47+
}
48+
}

0 commit comments

Comments
 (0)