You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project uses the YamlDotNet source generator infrastructure (`Vecc.YamlDotNet.Analyzers.StaticGenerator`) to prepare for Native AOT support.
4
+
5
+
## Current Status
6
+
7
+
The source generator infrastructure is in place but **not actively used** due to current limitations:
8
+
9
+
### Why Not Fully Implemented?
10
+
11
+
1.**Custom Type Inspector Limitation**: The generated `StaticTypeInspector` doesn't properly honor custom type inspectors, which GitVersion requires for `JsonPropertyName` attribute support
12
+
2.**Dynamic Type Support**: The source generator doesn't support `Dictionary<object, object?>` used in override configurations
13
+
3.**Property Compatibility**: Required changing `internal init` to `internal set` for all configuration properties
14
+
15
+
### What's Ready?
16
+
17
+
-`GitVersionConfigurationStaticContext` class with `[YamlStaticContext]` attribute
18
+
-`[YamlSerializable]` attributes for main configuration types
19
+
- Properties changed from `init` to `set` for generator compatibility
20
+
- Source generator package reference and build integration
21
+
22
+
### Future Use
23
+
24
+
When YamlDotNet source generator improves support for:
25
+
- Custom type inspectors
26
+
- Init-only properties
27
+
- Complex/dynamic types
28
+
29
+
We can enable it in `ConfigurationSerializer.cs` by uncommenting the static builder usage.
30
+
31
+
## References
32
+
33
+
-[Blog Post: Using YamlDotNet Source Generator for Native AOT](https://andrewlock.net/using-the-yamldotnet-source-generator-for-native-aot/)
0 commit comments