Skip to content

Commit

Permalink
Not sure if less janky.
Browse files Browse the repository at this point in the history
  • Loading branch information
thygrrr committed Nov 14, 2024
1 parent 546ee7e commit 9f82389
Show file tree
Hide file tree
Showing 17 changed files with 2,993 additions and 665 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,5 @@ Library
Temp
*.DotSettings.user
*.Artifacts
s3/
.dist
*.old

generated/
*.old
9 changes: 0 additions & 9 deletions fennecs.generators/Properties/launchSettings.json

This file was deleted.

26 changes: 0 additions & 26 deletions fennecs.generators/fennecs.generators.csproj

This file was deleted.

5 changes: 3 additions & 2 deletions fennecs.tests/Stream/Stream.3.Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ namespace fennecs.tests.Stream;
public class Stream3Tests(ITestOutputHelper output)
{

[Fact] public void Can_Use_RW_Inferred()
[Fact] public void Can_Use_RWR_Inferred()
{
using var world = new World();
var entity = world.Spawn();
entity.Add(123).Add(890f).Add("ramen");

var stream = world.Stream<int, float, string>();


stream.For(static (a, b, s) =>
{
Assert.Equal(123, a.read);
Assert.Equal(890f, b.read);
b.write = 456f;
s.write = "dieter";
});

}
Expand All @@ -37,6 +37,7 @@ public void Can_Enumerate_Stream()
List<(Entity, string, int, float)> list = [(arnold, "Arnold", 1, 7.0f), (dolph, "Dolph", 2, 8.0f)];

var stream = world.Stream<string, int, float>();

foreach (var row in stream)
{
Assert.True(list.Remove(row));
Expand Down
5 changes: 0 additions & 5 deletions fennecs/Delegates.0.cs

This file was deleted.

38 changes: 0 additions & 38 deletions fennecs/Delegates.1.cs

This file was deleted.

47 changes: 0 additions & 47 deletions fennecs/Delegates.2.cs

This file was deleted.

93 changes: 0 additions & 93 deletions fennecs/Delegates.3.cs

This file was deleted.

22 changes: 11 additions & 11 deletions fennecs/fennecs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,13 @@
<Nullable>enable</Nullable>
<CheckForOverflowUnderflow>false</CheckForOverflowUnderflow>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<EmitCompilerGeneratedFiles>true</EmitCompilerGeneratedFiles>
<CompilerGeneratedFilesOutputPath>generated</CompilerGeneratedFilesOutputPath>

</PropertyGroup>

<ItemGroup>
<Compile Remove="generated\**" />
<Content Include="generated\**" />
</ItemGroup>

<Target Name="PreBuild" BeforeTargets="PreBuildEvent">
<Exec Command="dotnet-codegencs.exe template run .\generators\Streams.csx -o generated" />
</Target>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<EnablePackageValidation>true</EnablePackageValidation>
Expand All @@ -62,7 +59,7 @@
</ItemGroup>

<ItemGroup>
<None Include="../nuget/nuget.md" Pack="true" PackagePath="\"/>
<None Include="../nuget/nuget.md" Pack="true" PackagePath="\" />
<None Include="../nuget/fennecs-icon-nuget.png">
<PackagePath>.</PackagePath>
<Pack>True</Pack>
Expand All @@ -71,11 +68,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Numerics.Tensors" Version="9.0.0"/>
<Folder Include="generated\" />
</ItemGroup>

<!-- Waiting on https://github.com/Drizin/CodegenCS/issues/36
<ItemGroup>
<ProjectReference Include="..\fennecs.generators\fennecs.generators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" SetTargetFramework="TargetFramework=netstandard2.0" />
<PackageReference Include="CodegenCS.MSBuild" Version="3.5.2" PrivateAssets="All">
</PackageReference>
</ItemGroup>
-->

</Project>
1 change: 1 addition & 0 deletions fennecs/fennecs.csproj.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
<s:String x:Key="/Default/CodeInspection/Daemon/ConfigureAwaitAnalysisMode/@EntryValue">Library</s:String>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=expressions/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=generated/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=generators/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=streams/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
Loading

0 comments on commit 9f82389

Please sign in to comment.