feat(generator)!: support multi-assembly component composition#1188
Open
kimpenhaus wants to merge 6 commits into
Open
feat(generator)!: support multi-assembly component composition#1188kimpenhaus wants to merge 6 commits into
kimpenhaus wants to merge 6 commits into
Conversation
…es and improved deduplication - Added support for namespace configuration via the `KubeOpsGeneratorNamespace` MSBuild property to avoid name conflicts in multi-assembly scenarios. - Improved deduplication by grouping registrations (controllers, finalizers) while ignoring location information. - Introduced additional file tracking for analyzer releases and warnings for conflicting registration class names. - Updated test cases to align with these changes.
- Removed unnecessary XML documentation from `GeneratorSyntaxExtensions`. - Deleted unused `AnalyzerReleases.Shipped.md` and `AnalyzerReleases.Unshipped.md` entries from the project file to reduce clutter.
… operator reference - Updated `OperatorBuilderGenerator` to skip generating `RegisterComponents` when no components are present or `KubeOps.Operator` is not referenced. - Improved logic to ensure empty aggregations are only generated if necessary. - Revised associated test cases to validate the new conditional behavior. - Updated migration documentation to reflect changes in `RegisterComponents` generation logic.
- Updated `EntityDefinitionGenerator` to exclude entities from referenced assemblies in generated metadata. - Added tests to verify definitions are only generated for locally declared entities. - Revised README and migration documentation to clarify changes in entity metadata generation logic.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Enable controllers and finalizers from referenced class libraries to be registered automatically.
KubeOpsGeneratorNamespaceMSBuild property to prevent generated-name conflicts.KOG002for conflicting registration class names.RegisterComponentswhen the project referencesKubeOps.Operatoror contains referenced components.analyzers/dotnet/cs; remove the redundantlib/netstandard2.0asset.Breaking changes
OperatorBuilderExtensions.RegisterComponentsandEntityInitializer.Initializeare now generated asinternal.Code that calls these generated extensions from another assembly will no longer compile. Reference
KubeOps.Generatorin the calling project so it generates its own extensions.The generator assembly is no longer available through
lib/netstandard2.0. Consumers must load it through the standard analyzer asset provided by the NuGet package.