fix(codegen): Creates multiple steps for serialization source generator (#628)
Roslyn Source generators are not supposed to access I/O. To get around this we have to use `AdditionalFiles` to give the analyzer access to read/load the schema files. To write the schema files we have to use a separate program altogether. - [X] Adds SerializationSchemaGenerator - [X] Splits out the SerializationGenerator code
This commit is contained in:
parent
f2d44e0283
commit
b6779a7c09
48 changed files with 641 additions and 297 deletions
|
|
@ -39,24 +39,13 @@
|
|||
<PackageReference Include="Zlib.Bindings" Version="1.5.0" />
|
||||
<PackageReference Include="Argon2.Bindings" Version="1.9.1" />
|
||||
</ItemGroup>
|
||||
<!-- <ItemGroup>-->
|
||||
<!-- <ProjectReference Include="..\SerializationGenerator\SerializationGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />-->
|
||||
<!-- </ItemGroup>-->
|
||||
<!-- <Target Name="AddSourceGeneratedFiles" AfterTargets="CoreCompile">-->
|
||||
<!-- <ItemGroup>-->
|
||||
<!-- <Compile Include="Generated\**" />-->
|
||||
<!-- </ItemGroup>-->
|
||||
<!-- </Target>-->
|
||||
<!-- <Target Name="RemoveSourceGeneratedFiles" BeforeTargets="CoreCompile">-->
|
||||
<!-- <ItemGroup>-->
|
||||
<!-- <Compile Remove="Generated\**" />-->
|
||||
<!-- </ItemGroup>-->
|
||||
<!-- <RemoveDir Directories="Generated" />-->
|
||||
<!-- </Target>-->
|
||||
<!-- <ItemGroup>-->
|
||||
<!-- <CompilerVisibleProperty Include="SerializableMigrationPath" />-->
|
||||
<!-- </ItemGroup>-->
|
||||
<!-- <PropertyGroup>-->
|
||||
<!-- <SerializableMigrationPath>.\Migrations\</SerializableMigrationPath>-->
|
||||
<!-- </PropertyGroup>-->
|
||||
<ItemGroup>
|
||||
<AdditionalFiles Include="Migrations/*.v*.json" />
|
||||
</ItemGroup>
|
||||
<!-- <Target Name="GenerateMigrationSchemas" AfterTargets="AfterBuild">-->
|
||||
<!-- <Message Importance="high" Text="Building serialization schema generator" />-->
|
||||
<!-- <Exec Command="dotnet build -c Release $(ProjectDir)../SerializationSchemaGenerator/SerializationSchemaGenerator.csproj" />-->
|
||||
<!-- <Message Importance="high" Text="Generating serialization schemas" />-->
|
||||
<!-- <Exec Command="dotnet $(ProjectDir)../SerializationSchemaGenerator/Output/SerializationSchemaGenerator.dll $(ProjectDir)../../ModernUO.sln" />-->
|
||||
<!-- </Target>-->
|
||||
</Project>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue