Skip to content

Commit 609bc85

Browse files
authored
Merge pull request #290 from distantcam/hotfix/broken-shortcircuiting
Fixing issue with classes that don't gen breaking generator
2 parents 5a297c8 + ee9c846 commit 609bc85

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

AutoCtor.sln

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
77
src\nugetfiles\AutoCtor.badcompat.targets = src\nugetfiles\AutoCtor.badcompat.targets
88
src\nugetfiles\AutoCtor.props = src\nugetfiles\AutoCtor.props
99
src\nugetfiles\AutoCtor.targets = src\nugetfiles\AutoCtor.targets
10-
.github\workflows\build.yml = .github\workflows\build.yml
1110
src\Common.props = src\Common.props
1211
src\Directory.Build.props = src\Directory.Build.props
1312
src\Directory.Packages.props = src\Directory.Packages.props
@@ -30,6 +29,12 @@ Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "AutoCtor.Shared", "src\Auto
3029
EndProject
3130
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AutoCtor.Roslyn4.0", "src\AutoCtor.Roslyn4.0\AutoCtor.Roslyn4.0.csproj", "{F73002A3-779E-445D-B563-85361FD8B35F}"
3231
EndProject
32+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
33+
ProjectSection(SolutionItems) = preProject
34+
.github\workflows\build.yml = .github\workflows\build.yml
35+
.github\workflows\publish.yml = .github\workflows\publish.yml
36+
EndProjectSection
37+
EndProject
3338
Global
3439
GlobalSection(SolutionConfigurationPlatforms) = preSolution
3540
Debug|Any CPU = Debug|Any CPU
@@ -64,6 +69,9 @@ Global
6469
GlobalSection(SolutionProperties) = preSolution
6570
HideSolutionNode = FALSE
6671
EndGlobalSection
72+
GlobalSection(NestedProjects) = preSolution
73+
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {8CC56491-C17C-44A5-8686-C41491E2E624}
74+
EndGlobalSection
6775
GlobalSection(ExtensibilityGlobals) = postSolution
6876
SolutionGuid = {6C1E6B0F-E4E8-410D-A9C6-D9128CAC4EC8}
6977
EndGlobalSection

src/AutoCtor.Shared/AutoConstructSourceGenerator/Emitter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public static void GenerateSource(
6464
var (source, parameters) = GenerateSource(context, type, postCtorMethods, baseParameters, input.Guards);
6565

6666
if (source == null || parameters == null)
67-
return;
67+
continue;
6868

6969
ctorMaps.Add(type.TypeKey, parameters);
7070

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public interface IService { }
2+
3+
[AutoCtor.AutoConstruct]
4+
public partial class OtherClass
5+
{
6+
}
7+
8+
[AutoCtor.AutoConstruct]
9+
public partial class Broken251Release
10+
{
11+
private readonly IService _service;
12+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//HintName: Broken251Release.g.cs
2+
//------------------------------------------------------------------------------
3+
// <auto-generated>
4+
// This code was generated by https://github.com/distantcam/AutoCtor
5+
// </auto-generated>
6+
//------------------------------------------------------------------------------
7+
8+
partial class Broken251Release
9+
{
10+
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute]
11+
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
12+
public Broken251Release(global::IService service)
13+
{
14+
this._service = service;
15+
}
16+
}

0 commit comments

Comments
 (0)