-
Notifications
You must be signed in to change notification settings - Fork 43
Add Spectre.Console latest (0.48.0) to Source Build #244
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
patches/spectre-console/0001-remove-packagereferences-for-build.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
From ad9eef0f848288b6fdc23c93e6e90f367d62c361 Mon Sep 17 00:00:00 2001 | ||
From: baronfel <chusk3@gmail.com> | ||
Date: Mon, 18 Dec 2023 14:09:06 -0600 | ||
Subject: [PATCH] wip | ||
|
||
--- | ||
src/Directory.Build.props | 4 ++-- | ||
1 file changed, 2 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/Directory.Build.props b/src/Directory.Build.props | ||
index 6bf853f..59c8130 100644 | ||
--- a/src/Directory.Build.props | ||
+++ b/src/Directory.Build.props | ||
@@ -31,7 +31,7 @@ | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
</PropertyGroup> | ||
|
||
- <ItemGroup Label="Package References"> | ||
+ <!-- <ItemGroup Label="Package References"> | ||
<PackageReference Include="MinVer" PrivateAssets="All" Version="4.2.0" /> | ||
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" /> | ||
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.435"> | ||
@@ -40,5 +40,5 @@ | ||
<PackageReference Include="Roslynator.Analyzers" Version="4.1.2"> | ||
<PrivateAssets>All</PrivateAssets> | ||
</PackageReference> | ||
- </ItemGroup> | ||
+ </ItemGroup> --> | ||
</Project> | ||
\ No newline at end of file | ||
-- | ||
2.40.1 | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<Project> | ||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<PropertyGroup> | ||
<PackagesOutput>$(ProjectDirectory)/src/Spectre.Console/bin/$(Configuration)/</PackagesOutput> | ||
<SpectreConsolePackageVersion>0.48.0</SpectreConsolePackageVersion> | ||
</PropertyGroup> | ||
|
||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> | ||
|
||
<Target Name="RepoBuild"> | ||
<PropertyGroup> | ||
<BuildCommandArgs>$(ProjectDirectory)/src/Spectre.Console/Spectre.Console.csproj</BuildCommandArgs> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We only take the main project - the Spectre analyzers aren't required, and we're not currently planning on using any functionality from the minor extensions packages that Spectre provides. |
||
<BuildCommandArgs>$(BuildCommandArgs) /p:Configuration=$(Configuration)</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) /v:$(LogVerbosity)</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) $(RedirectRepoOutputToLog)</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) /p:Version=$(SpectreConsolePackageVersion)</BuildCommandArgs> | ||
<BuildCommandArgs>$(BuildCommandArgs) /p:TargetFrameworks=$(NetCurrent)</BuildCommandArgs> | ||
</PropertyGroup> | ||
|
||
<Exec Command="$(DotnetToolCommand) restore /bl:restore.binlog $(BuildCommandArgs)" | ||
EnvironmentVariables="@(EnvironmentVariables)" | ||
WorkingDirectory="$(ProjectDirectory)" | ||
IgnoreStandardErrorWarningFormat="true" /> | ||
|
||
<Exec Command="$(DotnetToolCommand) build /bl:build.binlog $(BuildCommandArgs)" | ||
EnvironmentVariables="@(EnvironmentVariables)" | ||
WorkingDirectory="$(ProjectDirectory)" | ||
IgnoreStandardErrorWarningFormat="true" /> | ||
|
||
<Exec Command="$(DotnetToolCommand) pack /bl:pack.binlog $(BuildCommandArgs)" | ||
EnvironmentVariables="@(EnvironmentVariables)" | ||
WorkingDirectory="$(ProjectDirectory)" | ||
IgnoreStandardErrorWarningFormat="true" /> | ||
</Target> | ||
|
||
</Project> | ||
|
Submodule spectre-console
added at
739716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need these analyzers or build-time dependencies in the source-build build of Spectre.Console because they mainly exist to check logic and set versions.
We don't need to check logic here (we're assuming upstream is generally good), and we know the version of Spectre we're building (it's set in the repro-projects wrapper project) so we can skip all of these dependencies outright.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, I am wondering if it would be feasible to introduce a conditional based on a property that source-build could then set? If so this change could be pushed upstream. The advantage of this is it would eliminate the need for this patch and the potential maintenance burden of it.