-
-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failing projection inlining with static mapper from another assem…
…bly (#1418)
- Loading branch information
Showing
12 changed files
with
239 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
using System.Collections.Immutable; | ||
using Microsoft.CodeAnalysis; | ||
using Riok.Mapperly.Descriptors; | ||
using Riok.Mapperly.Helpers; | ||
|
||
namespace Riok.Mapperly.Symbols; | ||
|
||
public sealed record CompilationContext(Compilation Compilation, WellKnownTypes Types, FileNameBuilder FileNameBuilder); | ||
public sealed record CompilationContext( | ||
Compilation Compilation, | ||
WellKnownTypes Types, | ||
ImmutableArray<Compilation> NestedCompilations, | ||
FileNameBuilder FileNameBuilder | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...s/_snapshots/UseExternalMapperFromAnotherAssemblyTest.SnapshotGeneratedSource.verified.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// <auto-generated /> | ||
#nullable enable | ||
namespace Riok.Mapperly.IntegrationTests.Mapper | ||
{ | ||
public static partial class UseExternalMapperFromAnotherAssembly | ||
{ | ||
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] | ||
public static partial global::System.Linq.IQueryable<global::Riok.Mapperly.IntegrationTests.Mapper.UseExternalMapperFromAnotherAssembly.Target> ProjectToTarget(global::System.Linq.IQueryable<global::Riok.Mapperly.IntegrationTests.Mapper.UseExternalMapperFromAnotherAssembly.Source> source) | ||
{ | ||
#nullable disable | ||
return System.Linq.Queryable.Select(source, x => new global::Riok.Mapperly.IntegrationTests.Mapper.UseExternalMapperFromAnotherAssembly.Target() | ||
{ | ||
DateTime = global::Riok.Mapperly.TestDependency.Mapper.DateTimeMapper.MapToDateTimeOffset(x.DateTime), | ||
}); | ||
#nullable enable | ||
} | ||
|
||
[global::System.CodeDom.Compiler.GeneratedCode("Riok.Mapperly", "0.0.1.0")] | ||
public static partial global::Riok.Mapperly.IntegrationTests.Mapper.UseExternalMapperFromAnotherAssembly.Target MapToTarget(global::Riok.Mapperly.IntegrationTests.Mapper.UseExternalMapperFromAnotherAssembly.Source source) | ||
{ | ||
var target = new global::Riok.Mapperly.IntegrationTests.Mapper.UseExternalMapperFromAnotherAssembly.Target(); | ||
target.DateTime = global::Riok.Mapperly.TestDependency.Mapper.DateTimeMapper.MapToDateTimeOffset(source.DateTime); | ||
return target; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters