Skip to content

Conversation

@carcer
Copy link
Contributor

@carcer carcer commented Jan 28, 2026

Closes #2080

Problem

When users configure:

builder.Services.CritterStackDefaults(profile =>
{
    profile.GeneratedCodeOutputPath = "Test/ABC";
});

Wolverine ignores this setting because:

  1. WolverineOptions.ReadJasperFxOptions() doesn't copy GeneratedCodeOutputPath from JasperFxOptions (unlike Marten which does)
  2. The DEBUG path adjustment in HostBuilderExtensions overwrites any configured path

Changes

  • WolverineOptions.cs - Added GeneratedCodeOutputPath propagation from JasperFxOptions in ReadJasperFxOptions(), following Marten's pattern
  • HostBuilderExtensions.cs - Restructured DEBUG path adjustment to respect user-configured paths and AutoResolveProjectRoot setting
  • docs/guide/codegen.md - Added documentation section "Customizing the Generated Code Output Path"
  • CodegenUsage.cs - Added code snippets for documentation

Tests

  • Added 5 new tests in generated_code_output_path_configuration.cs verifying the fix

Test Plan

  • All existing tests pass
  • New unit tests verify GeneratedCodeOutputPath propagation
  • New integration test verifies CritterStackDefaults flows to Wolverine
  • Verified explicit Wolverine configuration takes precedence

@jeremydmiller jeremydmiller merged commit 71e5dbf into JasperFx:main Jan 28, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CritterStackDefaults.GeneratedCodeOutputPath does not change output dir

2 participants