Deleted all the infrastructure to reference source generators locally. Added a separate test project for source generators to avoid conflicts due to SGs including files from other projects directly.
このコミットが含まれているのは:
1 親
99529c3688
コミット
41e9af11e7
7ファイル変更
+42
-66
検索条件に一致するファイルはありません
+21
-2
@@ -37,12 +37,14 @@ Project("{13B669BE-BB05-4DDF-9536-439F39A36129}") = "ComputeSharp.Package", "src
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{FB17EF84-9208-47AC-921F-680CB1DAD8BA}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Sample.Local", "samples\ComputeSharp.Sample.Local\ComputeSharp.Sample.Local.csproj", "{7048DEEA-0A6F-46A0-B951-B682A8F1CB75}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Sample.Local", "samples\ComputeSharp.Sample.Local\ComputeSharp.Sample.Local.csproj", "{7048DEEA-0A6F-46A0-B951-B682A8F1CB75}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Sample.NuGet", "samples\ComputeSharp.Sample.NuGet\ComputeSharp.Sample.NuGet.csproj", "{C423C061-64F7-4C12-8E5F-75C5351D6308}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ComputeSharp.Sample.NuGet", "samples\ComputeSharp.Sample.NuGet\ComputeSharp.Sample.NuGet.csproj", "{C423C061-64F7-4C12-8E5F-75C5351D6308}"
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "ComputeSharp.Sample.Shared", "samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.shproj", "{8CEFC324-CA6C-4845-9AD9-70B92BD87057}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ComputeSharp.Tests.Internals.SourceGenerators", "tests\ComputeSharp.Tests.Internals.SourceGenerators\ComputeSharp.Tests.Internals.SourceGenerators.csproj", "{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
samples\ComputeSharp.Sample.Shared\ComputeSharp.Sample.Shared.projitems*{7048deea-0a6f-46a0-b951-b682a8f1cb75}*SharedItemsImports = 5
|
||||
@@ -152,6 +154,22 @@ Global
|
||||
{C423C061-64F7-4C12-8E5F-75C5351D6308}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{C423C061-64F7-4C12-8E5F-75C5351D6308}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{C423C061-64F7-4C12-8E5F-75C5351D6308}.Release|x64.Build.0 = Release|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{149173F5-D0CE-4FEC-A040-DE472707D6B2}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -165,6 +183,7 @@ Global
|
||||
{7048DEEA-0A6F-46A0-B951-B682A8F1CB75} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
{C423C061-64F7-4C12-8E5F-75C5351D6308} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
{8CEFC324-CA6C-4845-9AD9-70B92BD87057} = {0ED8F632-5E17-46BE-8CC3-B14A82D4AEB1}
|
||||
{BBBD0ADD-F2F9-49A3-BD5E-D223F0735D8B} = {F8EFBB27-4EE2-4463-A75B-7EFDFB55D0F7}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {4664C5E3-0340-4E22-BCFD-98AAEDF5F2DC}
|
||||
|
||||
@@ -1,41 +0,0 @@
|
||||
<Project>
|
||||
|
||||
<!--This file is needed to properly resolve the necessary runtime dependencies to the sample projects
|
||||
directly referencing the library through a project reference, and not through a local NuGet package.-->
|
||||
<Target Name="GetRuntimeDependenciesForAnalyzer"
|
||||
DependsOnTargets="ComputeResolvedFilesToPublishList"
|
||||
Outputs="@(ResolvedAssemblyToPublish)">
|
||||
<ItemGroup>
|
||||
<ResolvedAssemblyToPublish Include="@(ResolvedFileToPublish->'%(FullPath)')"
|
||||
Condition="'%(Extension)' == '.dll' AND '%(FileName)' != '$(MSBuildProjectName)'" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="ComputeAnalyzerProjectReferences"
|
||||
AfterTargets="AfterResolveReferences">
|
||||
<ItemGroup>
|
||||
<AnalyzerProjectReference Include="@(_MSBuildProjectReferenceExistent)"
|
||||
Condition="'%(_MSBuildProjectReferenceExistent.OutputItemType)' == 'Analyzer'" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="PassAnalyzerDependenciesToCompiler"
|
||||
Condition="'@(AnalyzerProjectReference)' != ''"
|
||||
AfterTargets="ComputeAnalyzerProjectReferences"
|
||||
BeforeTargets="CoreCompile">
|
||||
<MSBuild Projects="@(AnalyzerProjectReference)"
|
||||
Targets="GetRuntimeDependenciesForAnalyzer"
|
||||
RemoveProperties="%(AnalyzerProjectReference.GlobalPropertiesToRemove)">
|
||||
<Output TaskParameter="TargetOutputs" ItemName="AnalyzerDependency"/>
|
||||
</MSBuild>
|
||||
|
||||
<Message Text="Analyzer project references for $(MSBuildProjectName):" Importance="High" />
|
||||
<Message Text=" %(AnalyzerProjectReference.FileName)" Importance="High" />
|
||||
<Message Text="Resolved analyzer dependencies:" Importance="High" />
|
||||
<Message Text=" %(AnalyzerDependency.FileName)" Importance="High" />
|
||||
|
||||
<ItemGroup>
|
||||
<Analyzer Include="@(AnalyzerDependency)" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -3,26 +3,11 @@
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard2.0;net5.0</TargetFrameworks>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
||||
<!--This is needed so that the packaging for the source generator is correct. We want to have the package references
|
||||
of this project be private when packing the source generator (the nugetizer infrastructure recognizes that and
|
||||
packages the dependencies directly alongside the main binary), and public dependencies when packing the main project.
|
||||
Notably, when building the source generator for sample projects via ProjectReferences, we do not want the packages to be private.-->
|
||||
<BuildingPackageForSourceGenerator>false</BuildingPackageForSourceGenerator>
|
||||
<BuildingPackageForSourceGenerator Condition="'$(TargetFramework)' == 'netstandard2.0' AND '$(BuildingPackage)' == 'true'">true</BuildingPackageForSourceGenerator>
|
||||
|
||||
<PackSymbols Condition="'$(BuildingPackageForSourceGenerator)' == 'true'">false</PackSymbols>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
|
||||
|
||||
<!--Hide the package references when this assembly is being packed with the source generator-->
|
||||
<PackageReference Condition="'$(BuildingPackageForSourceGenerator)' == 'true'" Update="@(PackageReference)" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -3,11 +3,7 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<PackFolder>lib\$(TargetFramework)</PackFolder>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
差分なしでファイル名を変更。
@@ -9,11 +9,9 @@
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.8.3" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.8.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\src\ComputeSharp.SourceGenerators\ComputeSharp.SourceGenerators.csproj" />
|
||||
<ProjectReference Include="..\..\src\ComputeSharp\ComputeSharp.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
新しいイシューから参照
ユーザーをブロックする