Skip to content

Commit 6fcff0b

Browse files
committed
Split generators into two projects
1 parent 0907419 commit 6fcff0b

6 files changed

Lines changed: 29 additions & 0 deletions

File tree

File renamed without changes.
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<!-- The CsWinRT half of the generators, split out of Telegram.Generators so that .NET Native
4+
never loads it. Both pieces here answer questions only a trimmed CsWinRT build asks, and
5+
both walk every cast in the app to do it: DynamicCastRootGenerator alone spent 13s per csc
6+
invocation on Telegram.csproj - twice per build, since XamlPreCompile and CoreCompile each
7+
run one - and then discarded the result, because there is nothing to root when nothing is
8+
trimmed. A generator cannot opt out before its syntax pass runs, so the only way to stop
9+
paying for it is to not hand .NET Native the assembly. -->
10+
11+
<PropertyGroup>
12+
<TargetFramework>netstandard2.0</TargetFramework>
13+
<LangVersion>14.0</LangVersion>
14+
<OutputItemType>Analyzer</OutputItemType>
15+
<IncludeBuildOutput>true</IncludeBuildOutput>
16+
<Nullable>disable</Nullable>
17+
<EnforceExtendedAnalyzerRules>true</EnforceExtendedAnalyzerRules>
18+
</PropertyGroup>
19+
20+
<ItemGroup>
21+
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="5.6.0" PrivateAssets="all" />
22+
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers" Version="5.6.0" PrivateAssets="all" />
23+
</ItemGroup>
24+
25+
</Project>
File renamed without changes.
File renamed without changes.

‎Telegram.Modern.slnx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<Platform Name="x64" />
55
</Configurations>
66
<Project Path="Telegram.Generators/Telegram.Generators.csproj" />
7+
<Project Path="Telegram.Generators.WinRT/Telegram.Generators.WinRT.csproj" />
78
<Project Path="Telegram.Msix.Modern/Telegram.Msix.Modern.wapproj" Type="c7167f0d-bc9f-4e6e-afe1-012c56b48db5">
89
<Deploy />
910
</Project>

‎Telegram/Telegram.Modern.csproj‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,9 @@
239239
<ProjectReference Include="..\Telegram.Generators\Telegram.Generators.csproj"
240240
OutputItemType="Analyzer"
241241
ReferenceOutputAssembly="false" />
242+
<ProjectReference Include="..\Telegram.Generators.WinRT\Telegram.Generators.WinRT.csproj"
243+
OutputItemType="Analyzer"
244+
ReferenceOutputAssembly="false" />
242245
<AdditionalFiles Include="..\Libraries\tdjson\td_api.tl" />
243246
<CompilerVisibleProperty Include="TdParsers" />
244247
</ItemGroup>

0 commit comments

Comments
 (0)