Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="mediatr" Version="12.2.0"/>
<PackageReference Include="Mediatr" Version="12.4.1" />
<PackageReference Include="FastEndpoints" Version="5.24.0"/>
</ItemGroup>

Expand Down
6 changes: 3 additions & 3 deletions working/content/modulith/Modulith.Web/Modulith.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@
</ItemGroup>
<!--#endif -->
<ItemGroup>
<PackageReference Include="FastEndpoints.Security" Version="5.29.0"/>
<PackageReference Include="FastEndpoints.Swagger" Version="5.29.0"/>
<PackageReference Include="FastEndpoints.Security" Version="5.30.0"/>
<PackageReference Include="FastEndpoints.Swagger" Version="5.30.0"/>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.0"/>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3"/>
<PackageReference Include="FastEndpoints" Version="5.29.0"/>
<PackageReference Include="FastEndpoints" Version="5.30.0"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<Project Sdk="Microsoft.NET.Sdk">
<ItemGroup>
<PackageReference Include="Mediatr" Version="12.4.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,16 @@
<PackageReference Include="xunit" Version="2.9.0"/>
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2"/>
<PackageReference Include="tngtech.archunitnet.xunit" Version="0.11.0"/>
<PackageReference Include="FastEndpoints.Testing" Version="5.30.0" />
<PackageReference Include="FluentAssertions" Version="6.12.1" />
</ItemGroup>

<ItemGroup>
<Using Include="Xunit"/>
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\Modulith.Web\Modulith.Web.csproj" />
<ProjectReference Include="..\Modulith.NewModule\Modulith.NewModule.csproj"/>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public void BeInternal()
.ResideInNamespace("Modulith.NewModule.*", true)
.And()
.AreNot([typeof(AssemblyInfo), typeof(NewModuleModuleServiceRegistrar)])
.And()
.DoNotResideInNamespace("Modulith.NewModule.Data.Migrations")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I understand the need for this. but since the template does not include migrations yet. I think this change should have been added with a template that has migrations. I'll add an issue to include this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just trying make it through Techorama :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess the issue is, if you use this template....a very natural progression would be to add EF Core.

Just trying to guide the developer into the pit of success

.As("Module types");

var rule = domainTypes.Should().BeInternal();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<ItemGroup>
<PackageReference Include="mediatr" Version="12.4.0"/>
<PackageReference Include="FastEndpoints" Version="5.29.0"/>
<PackageReference Include="FastEndpoints" Version="5.30.0"/>
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Modulith.NewModule;
public class NewModuleModuleServiceRegistrar : IRegisterModuleServices
{
public static IServiceCollection ConfigureServices(IServiceCollection services,
IConfiguration config)
IConfiguration configuration)
{
services.AddMediatR(
c => c.RegisterServicesFromAssemblies(typeof(AssemblyInfo).Assembly));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ private static void RegisterModuleServices(IServiceCollection services, Assembly
{
if (!TryGetServiceRegistrationMethod(logger, assembly, out var method))
{
logger.LogError("🛑 An error occurred registering services for assembly: '{assembly}'. Skipping registration", assembly.GetName());
Copy link
Collaborator

Choose a reason for hiding this comment

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

This error was generating some noise because some of the assemblies found didn't actually need to be registered and as a result the registration will fail. In a future release we should add the error back and fix the actual logic of finding the assemblies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you want to add the log back in and turn it to info or debug?
A natural progression of using a Contract in a module shouldn't cause errors.

return;
}

Expand Down