feat(platform): Campaign LA LA0 — extract ApplicationPathSet to AcDream.Platform
The launcher (LA3/LA4) needs the XDG/Windows path contract (ApplicationPathSet/IApplicationPathEnvironment) without pulling in any gameplay assembly. Move it out of AcDream.Runtime into a new BCL-only AcDream.Platform project so the launcher-side Launcher.Core project can reference it directly per the campaign plan (docs/plans/2026-08-14-launcher-campaign.md, LA0). Namespace renamed AcDream.Runtime.Platform -> AcDream.Platform; code is otherwise byte-identical (no logic changes). AcDream.Runtime now carries a ProjectReference to AcDream.Platform and re-exports it transitively, so App and Headless keep resolving the type without a direct reference and K0's Headless single-ProjectReference guard (HeadlessAssemblyReferencesOnlyTheRuntimeProject) stands unchanged. The sibling Runtime dependency-boundary guard (RuntimeProjectDeclaresOnlyApprovedProjectDependencies) does assert Runtime's own project-reference set, so it needed a deliberate, documented addition of AcDream.Platform to its expected list. Moved tests/AcDream.Runtime.Tests/Platform/ApplicationPathSetTests.cs to a new tests/AcDream.Platform.Tests/ project (namespace AcDream.Platform.Tests) referencing only AcDream.Platform. Registered both new projects in AcDream.slnx. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
7f24af1a37
commit
cb6502c8a5
14 changed files with 49 additions and 10 deletions
|
|
@ -7,6 +7,7 @@
|
||||||
<Project Path="src/AcDream.Core/AcDream.Core.csproj" />
|
<Project Path="src/AcDream.Core/AcDream.Core.csproj" />
|
||||||
<Project Path="src/AcDream.Core.Net/AcDream.Core.Net.csproj" />
|
<Project Path="src/AcDream.Core.Net/AcDream.Core.Net.csproj" />
|
||||||
<Project Path="src/AcDream.Headless/AcDream.Headless.csproj" />
|
<Project Path="src/AcDream.Headless/AcDream.Headless.csproj" />
|
||||||
|
<Project Path="src/AcDream.Platform/AcDream.Platform.csproj" />
|
||||||
<Project Path="src/AcDream.Plugin.Abstractions/AcDream.Plugin.Abstractions.csproj" />
|
<Project Path="src/AcDream.Plugin.Abstractions/AcDream.Plugin.Abstractions.csproj" />
|
||||||
<Project Path="src/AcDream.Plugins.Smoke/AcDream.Plugins.Smoke.csproj" />
|
<Project Path="src/AcDream.Plugins.Smoke/AcDream.Plugins.Smoke.csproj" />
|
||||||
<Project Path="src/AcDream.Runtime/AcDream.Runtime.csproj" />
|
<Project Path="src/AcDream.Runtime/AcDream.Runtime.csproj" />
|
||||||
|
|
@ -24,6 +25,7 @@
|
||||||
<Project Path="tests/AcDream.Core.Tests/AcDream.Core.Tests.csproj" />
|
<Project Path="tests/AcDream.Core.Tests/AcDream.Core.Tests.csproj" />
|
||||||
<Project Path="tests/AcDream.Core.Net.Tests/AcDream.Core.Net.Tests.csproj" />
|
<Project Path="tests/AcDream.Core.Net.Tests/AcDream.Core.Net.Tests.csproj" />
|
||||||
<Project Path="tests/AcDream.Headless.Tests/AcDream.Headless.Tests.csproj" />
|
<Project Path="tests/AcDream.Headless.Tests/AcDream.Headless.Tests.csproj" />
|
||||||
|
<Project Path="tests/AcDream.Platform.Tests/AcDream.Platform.Tests.csproj" />
|
||||||
<Project Path="tests/AcDream.Runtime.Tests/AcDream.Runtime.Tests.csproj" />
|
<Project Path="tests/AcDream.Runtime.Tests/AcDream.Runtime.Tests.csproj" />
|
||||||
<Project Path="tests/AcDream.UI.Abstractions.Tests/AcDream.UI.Abstractions.Tests.csproj" />
|
<Project Path="tests/AcDream.UI.Abstractions.Tests/AcDream.UI.Abstractions.Tests.csproj" />
|
||||||
</Folder>
|
</Folder>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using AcDream.App.Rendering;
|
using AcDream.App.Rendering;
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
|
|
||||||
namespace AcDream.App.Platform;
|
namespace AcDream.App.Platform;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
|
|
||||||
namespace AcDream.App.Platform;
|
namespace AcDream.App.Platform;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ using AcDream.App.Plugins;
|
||||||
using AcDream.App.Platform;
|
using AcDream.App.Platform;
|
||||||
using AcDream.App.Rendering;
|
using AcDream.App.Rendering;
|
||||||
using AcDream.Core.Plugins;
|
using AcDream.Core.Plugins;
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
using Serilog;
|
using Serilog;
|
||||||
|
|
||||||
GraphicalHostPlatformServices graphicalPlatform =
|
GraphicalHostPlatformServices graphicalPlatform =
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ using AcDream.App.Settings;
|
||||||
using AcDream.App.Platform;
|
using AcDream.App.Platform;
|
||||||
using AcDream.App.World;
|
using AcDream.App.World;
|
||||||
using AcDream.Content;
|
using AcDream.Content;
|
||||||
|
using AcDream.Platform;
|
||||||
using AcDream.Runtime;
|
using AcDream.Runtime;
|
||||||
using AcDream.Runtime.Platform;
|
|
||||||
using AcDream.Runtime.Entities;
|
using AcDream.Runtime.Entities;
|
||||||
using AcDream.Runtime.Gameplay;
|
using AcDream.Runtime.Gameplay;
|
||||||
using AcDream.Runtime.Session;
|
using AcDream.Runtime.Session;
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using AcDream.Headless.Configuration;
|
using AcDream.Headless.Configuration;
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
|
|
||||||
namespace AcDream.Headless.Platform;
|
namespace AcDream.Headless.Platform;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
|
|
||||||
namespace AcDream.Headless.Platform;
|
namespace AcDream.Headless.Platform;
|
||||||
|
|
||||||
|
|
|
||||||
9
src/AcDream.Platform/AcDream.Platform.csproj
Normal file
9
src/AcDream.Platform/AcDream.Platform.csproj
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
namespace AcDream.Runtime.Platform;
|
namespace AcDream.Platform;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BCL-only view of the process environment used to resolve portable
|
/// BCL-only view of the process environment used to resolve portable
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
<ProjectReference Include="..\AcDream.Core\AcDream.Core.csproj" />
|
<ProjectReference Include="..\AcDream.Core\AcDream.Core.csproj" />
|
||||||
<ProjectReference Include="..\AcDream.Core.Net\AcDream.Core.Net.csproj" />
|
<ProjectReference Include="..\AcDream.Core.Net\AcDream.Core.Net.csproj" />
|
||||||
<ProjectReference Include="..\AcDream.Content\AcDream.Content.csproj" />
|
<ProjectReference Include="..\AcDream.Content\AcDream.Content.csproj" />
|
||||||
|
<ProjectReference Include="..\AcDream.Platform\AcDream.Platform.csproj" />
|
||||||
<ProjectReference Include="..\AcDream.Plugin.Abstractions\AcDream.Plugin.Abstractions.csproj" />
|
<ProjectReference Include="..\AcDream.Plugin.Abstractions\AcDream.Plugin.Abstractions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
using AcDream.App.Platform;
|
using AcDream.App.Platform;
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
|
|
||||||
namespace AcDream.App.Tests.Platform;
|
namespace AcDream.App.Tests.Platform;
|
||||||
|
|
||||||
|
|
|
||||||
22
tests/AcDream.Platform.Tests/AcDream.Platform.Tests.csproj
Normal file
22
tests/AcDream.Platform.Tests/AcDream.Platform.Tests.csproj
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="coverlet.collector" Version="6.0.4" />
|
||||||
|
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||||
|
<PackageReference Include="xunit" Version="2.9.3" />
|
||||||
|
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Using Include="Xunit" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\..\src\AcDream.Platform\AcDream.Platform.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
using AcDream.Runtime.Platform;
|
using AcDream.Platform;
|
||||||
|
|
||||||
namespace AcDream.Runtime.Tests.Platform;
|
namespace AcDream.Platform.Tests;
|
||||||
|
|
||||||
public sealed class ApplicationPathSetTests
|
public sealed class ApplicationPathSetTests
|
||||||
{
|
{
|
||||||
|
|
@ -72,6 +72,11 @@ public sealed class RuntimeDependencyBoundaryTests
|
||||||
"AcDream.Content",
|
"AcDream.Content",
|
||||||
"AcDream.Core",
|
"AcDream.Core",
|
||||||
"AcDream.Core.Net",
|
"AcDream.Core.Net",
|
||||||
|
// Campaign LA LA0: AcDream.Platform is the new BCL-only
|
||||||
|
// ApplicationPathSet home; Runtime re-exports it
|
||||||
|
// transitively so App/Headless keep reaching it without a
|
||||||
|
// direct reference.
|
||||||
|
"AcDream.Platform",
|
||||||
"AcDream.Plugin.Abstractions",
|
"AcDream.Plugin.Abstractions",
|
||||||
}
|
}
|
||||||
.Select(projectName => Path.Combine(
|
.Select(projectName => Path.Combine(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue