Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Humans.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<Project Path="docs/docs.csproj" />
<Folder Name="/src/">
<Project Path="src/Humans.Analyzers/Humans.Analyzers.csproj" />
<Project Path="src/Humans.Interfaces/Humans.Interfaces.csproj" />
<Project Path="src/Humans.Domain/Humans.Domain.csproj" />
<Project Path="src/Humans.Application/Humans.Application.csproj" />
<Project Path="src/Humans.Infrastructure/Humans.Infrastructure.csproj" />
Expand Down
1 change: 1 addition & 0 deletions src/Humans.Application/Humans.Application.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

<ItemGroup>
<ProjectReference Include="..\Humans.Domain\Humans.Domain.csproj" />
<ProjectReference Include="..\Humans.Interfaces\Humans.Interfaces.csproj" />

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Copy Humans.Interfaces.csproj in the Docker restore layer

When building the Docker image, the restore layer copies the existing Domain/Application/Infrastructure/Web project files (Dockerfile:7-10) and runs dotnet restore src/Humans.Web/Humans.Web.csproj before COPY src/ src/; this new ProjectReference points to src/Humans.Interfaces/Humans.Interfaces.csproj, which is not present in that layer, so Docker restores fail with a missing project file before publish can run. Add a matching COPY for the new project before the restore step.

Useful? React with 👍 / 👎.

</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 10 additions & 0 deletions src/Humans.Interfaces/Humans.Interfaces.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">

<!--
Lowest-level project: system marker interfaces and architecture attributes
only. No ProjectReferences, no NuGet packages. Namespaces intentionally
remain Humans.Application.* (namespace ≠ assembly) so call sites and the
Humans.Analyzers full-name constants are unaffected by the move.
-->

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,11 @@ internal static IEnumerable<string> ScanApplicationServiceEntityReadReturns()
}
}

// Anchored to a type that lives in Humans.Application — the marker
// interfaces (IApplicationService, IRepository, …) moved to the
// Humans.Interfaces assembly, keeping their namespaces.
private static IEnumerable<Type> ApplicationInterfaceTypes() =>
typeof(IApplicationService).Assembly.GetTypes()
typeof(IUserRepository).Assembly.GetTypes()
.Where(t => t.IsInterface)
.Where(t => t.Namespace?.StartsWith("Humans.Application.Interfaces", StringComparison.Ordinal) == true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ public void NoCircularConstructorDependencies_AcrossApplicationServices()
{
var assemblies = new[]
{
typeof(IApplicationService).Assembly,
typeof(UserService).Assembly,
typeof(HumansDbContext).Assembly,
typeof(Humans.Web.Controllers.HomeController).Assembly,
};
Expand Down
Loading