Skip to content

Commit 6664ddd

Browse files
dependabot[bot]Copilotagocke
authored
Bump Verify.SourceGenerators from 2.2.0 to 2.5.0 (#304)
- [x] Investigate CI build failures (17 snapshot mismatches in Serde.Generation.Test) - [x] Understand the snapshot format change in Verify.SourceGenerators 2.5.0 (diagnostic format now includes source context in Location and nested Descriptor object) - [x] Run tests locally to generate new snapshots - [x] Update all 17 failing verified snapshot files - [x] Validate all 155 tests pass (77 generation + 78 serde) - [x] Run final validation (code review and CodeQL both passed) --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: agocke <515774+agocke@users.noreply.github.com> Co-authored-by: Andy Gocke <andy@commentout.net>
1 parent 076a181 commit 6664ddd

18 files changed

Lines changed: 450 additions & 203 deletions

File tree

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
1919
<PackageVersion Include="System.Security.Cryptography.X509Certificates" Version="4.3.2" />
2020
<PackageVersion Include="PolyKit.Embedded" Version="3.0.9" />
21-
<PackageVersion Include="Verify.SourceGenerators" Version="2.2.0" />
21+
<PackageVersion Include="Verify.SourceGenerators" Version="2.5.0" />
2222
<PackageVersion Include="Verify.XunitV3" Version="31.15.0" />
2323
<PackageVersion Include="xunit.v3" Version="3.2.2" />
2424
</ItemGroup>
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_CantImplementAbstract,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (3,23)-(3,27),
9-
MessageFormat:
4+
Location: /*
5+
[GenerateDeserialize]
6+
abstract partial class Base { }
7+
^^^^
8+
*/
9+
: (3,23)-(3,27),
10+
Message:
1011
Can't generate serialize or deserialize implementations for 'Base' because it is abstract but is not a discriminated union. Implementations can only be generated for abstract types if they are discriminated unions. Discriminated unions are:
1112
- Abstract
1213
- Records
1314
- With only private constructors
1415
- With one or more nested records that inherit from the parent record,
15-
Message:
16+
Severity: Error,
17+
Descriptor: {
18+
Id: ERR_CantImplementAbstract,
19+
Title: ,
20+
MessageFormat:
1621
Can't generate serialize or deserialize implementations for 'Base' because it is abstract but is not a discriminated union. Implementations can only be generated for abstract types if they are discriminated unions. Discriminated unions are:
1722
- Abstract
1823
- Records
1924
- With only private constructors
2025
- With one or more nested records that inherit from the parent record,
21-
Category: Serde
26+
Category: Serde,
27+
DefaultSeverity: Error,
28+
IsEnabledByDefault: true
29+
}
2230
}
2331
]
2432
}
Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,32 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_CantImplementAbstract,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (3,24)-(3,28),
9-
MessageFormat:
4+
Location: /*
5+
[GenerateDeserialize]
6+
abstract partial record Base { }
7+
^^^^
8+
*/
9+
: (3,24)-(3,28),
10+
Message:
1011
Can't generate serialize or deserialize implementations for 'Base' because it is abstract but is not a discriminated union. Implementations can only be generated for abstract types if they are discriminated unions. Discriminated unions are:
1112
- Abstract
1213
- Records
1314
- With only private constructors
1415
- With one or more nested records that inherit from the parent record,
15-
Message:
16+
Severity: Error,
17+
Descriptor: {
18+
Id: ERR_CantImplementAbstract,
19+
Title: ,
20+
MessageFormat:
1621
Can't generate serialize or deserialize implementations for 'Base' because it is abstract but is not a discriminated union. Implementations can only be generated for abstract types if they are discriminated unions. Discriminated unions are:
1722
- Abstract
1823
- Records
1924
- With only private constructors
2025
- With one or more nested records that inherit from the parent record,
21-
Category: Serde
26+
Category: Serde,
27+
DefaultSeverity: Error,
28+
IsEnabledByDefault: true
29+
}
2230
}
2331
]
2432
}
Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,33 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_CantImplementAbstract,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (3,24)-(3,28),
9-
MessageFormat:
4+
Location: /*
5+
[GenerateDeserialize]
6+
abstract partial record Base
7+
^^^^
8+
{
9+
*/
10+
: (3,24)-(3,28),
11+
Message:
1012
Can't generate serialize or deserialize implementations for 'Base' because it is abstract but is not a discriminated union. Implementations can only be generated for abstract types if they are discriminated unions. Discriminated unions are:
1113
- Abstract
1214
- Records
1315
- With only private constructors
1416
- With one or more nested records that inherit from the parent record,
15-
Message:
17+
Severity: Error,
18+
Descriptor: {
19+
Id: ERR_CantImplementAbstract,
20+
Title: ,
21+
MessageFormat:
1622
Can't generate serialize or deserialize implementations for 'Base' because it is abstract but is not a discriminated union. Implementations can only be generated for abstract types if they are discriminated unions. Discriminated unions are:
1723
- Abstract
1824
- Records
1925
- With only private constructors
2026
- With one or more nested records that inherit from the parent record,
21-
Category: Serde
27+
Category: Serde,
28+
DefaultSeverity: Error,
29+
IsEnabledByDefault: true
30+
}
2231
}
2332
]
2433
}
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_MissingPrimaryCtor,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (2,14)-(2,15),
9-
MessageFormat: Type must have either a primary constructor or a parameterless constructor.,
4+
Location: /*
5+
[GenerateDeserialize]
6+
partial class C
7+
^
8+
{
9+
*/
10+
: (2,14)-(2,15),
1011
Message: Type must have either a primary constructor or a parameterless constructor.,
11-
Category: Serde
12+
Severity: Error,
13+
Descriptor: {
14+
Id: ERR_MissingPrimaryCtor,
15+
Title: ,
16+
MessageFormat: Type must have either a primary constructor or a parameterless constructor.,
17+
Category: Serde,
18+
DefaultSeverity: Error,
19+
IsEnabledByDefault: true
20+
}
1221
}
1322
]
1423
}
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_WrapperDoesntImplementInterface,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (37,21)-(37,27),
9-
MessageFormat: The proxy type 'Proxy' doesn't implement the interface 'IDeserializeProvider<Original?>'.,
4+
Location: /*
5+
[SerdeMemberOptions(DeserializeProxy = typeof(Proxy))]
6+
public Original? SdkDir { get; init; } = null;
7+
^^^^^^
8+
}
9+
*/
10+
: (37,21)-(37,27),
1011
Message: The proxy type 'Proxy' doesn't implement the interface 'IDeserializeProvider<Original?>'.,
11-
Category: Serde
12+
Severity: Error,
13+
Descriptor: {
14+
Id: ERR_WrapperDoesntImplementInterface,
15+
Title: ,
16+
MessageFormat: The proxy type 'Proxy' doesn't implement the interface 'IDeserializeProvider<Original?>'.,
17+
Category: Serde,
18+
DefaultSeverity: Error,
19+
IsEnabledByDefault: true
20+
}
1221
}
1322
]
1423
}
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_WrapperDoesntImplementInterface,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (16,21)-(16,29),
9-
MessageFormat: The proxy type 'Serde.ArrayProxy.Ser<System.Collections.Specialized.BitVector32.Section, Outer.SectionWrap>' doesn't implement the interface 'ISerializeProvider<System.Collections.Generic.List<int>>'.,
4+
Location: /*
5+
SerializeProxy = typeof(ArrayProxy.Ser<BitVector32.Section, Outer.SectionWrap>))]
6+
public List<int> Sections;
7+
^^^^^^^^
8+
}
9+
*/
10+
: (16,21)-(16,29),
1011
Message: The proxy type 'Serde.ArrayProxy.Ser<System.Collections.Specialized.BitVector32.Section, Outer.SectionWrap>' doesn't implement the interface 'ISerializeProvider<System.Collections.Generic.List<int>>'.,
11-
Category: Serde
12+
Severity: Error,
13+
Descriptor: {
14+
Id: ERR_WrapperDoesntImplementInterface,
15+
Title: ,
16+
MessageFormat: The proxy type 'Serde.ArrayProxy.Ser<System.Collections.Specialized.BitVector32.Section, Outer.SectionWrap>' doesn't implement the interface 'ISerializeProvider<System.Collections.Generic.List<int>>'.,
17+
Category: Serde,
18+
DefaultSeverity: Error,
19+
IsEnabledByDefault: true
20+
}
1221
}
1322
]
1423
}
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_CantWrapSpecialType,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (2,1)-(2,40),
9-
MessageFormat: The type 'string' can't be automatically wrapped because it is a built-in type.,
4+
Location: /*
5+
using Serde;
6+
[GenerateSerde(ForType = typeof(string))]
7+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
partial record struct StringWrap(string Wrapped);
9+
*/
10+
: (2,1)-(2,40),
1011
Message: The type 'string' can't be automatically wrapped because it is a built-in type.,
11-
Category: Serde
12+
Severity: Error,
13+
Descriptor: {
14+
Id: ERR_CantWrapSpecialType,
15+
Title: ,
16+
MessageFormat: The type 'string' can't be automatically wrapped because it is a built-in type.,
17+
Category: Serde,
18+
DefaultSeverity: Error,
19+
IsEnabledByDefault: true
20+
}
1221
}
1322
]
1423
}
Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{
22
Diagnostics: [
33
{
4-
Id: ERR_CantWrapSpecialType,
5-
Title: ,
6-
Severity: Error,
7-
WarningLevel: 0,
8-
Location: : (2,1)-(2,40),
9-
MessageFormat: The type 'string' can't be automatically wrapped because it is a built-in type.,
4+
Location: /*
5+
using Serde;
6+
[GenerateSerde(ForType = typeof(string))]
7+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8+
readonly partial struct StringWrap
9+
*/
10+
: (2,1)-(2,40),
1011
Message: The type 'string' can't be automatically wrapped because it is a built-in type.,
11-
Category: Serde
12+
Severity: Error,
13+
Descriptor: {
14+
Id: ERR_CantWrapSpecialType,
15+
Title: ,
16+
MessageFormat: The type 'string' can't be automatically wrapped because it is a built-in type.,
17+
Category: Serde,
18+
DefaultSeverity: Error,
19+
IsEnabledByDefault: true
20+
}
1221
}
1322
]
1423
}

0 commit comments

Comments
 (0)