-
Notifications
You must be signed in to change notification settings - Fork 0
Source gen improvements #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR significantly improves the source generation infrastructure for the DecSm.Atom build system. It consolidates attributes, enhances code generation patterns, and introduces new conveniences for workflow and parameter definitions.
Key changes:
- Consolidated
MinimalBuildDefinitionAttributeintoBuildDefinitionAttribute, simplifying the attribute model - Introduced
GenerateEntryPointandGenerateSolutionModelattributes for explicit opt-in code generation - Refactored source generators to use
ForAttributeWithMetadataNamefor better performance and incremental generation - Added
WorkflowTargetsandParamsnested classes for improved API discoverability - Changed from
SolutionPathtoMSBuildProjectDirectoryfor better solution file discovery - Added implicit operators for
WorkflowTargetDefinitionandParamDefinitionfor convenience
Reviewed changes
Copilot reviewed 80 out of 80 changed files in this pull request and generated 14 comments.
Show a summary per file
| File | Description |
|---|---|
_atom/_usings.cs |
Added global using for DecSm.Atom.Hosting namespace |
_atom/_atom.csproj |
Changed from SolutionPath to MSBuildProjectDirectory compiler-visible property |
_atom/Build.cs |
Updated to use new GenerateEntryPoint, GenerateSolutionModel attributes and WorkflowTargets API |
Sample_*/Build.cs |
Updated sample projects to use new attribute pattern and inherit from BuildDefinition |
DecSm.Atom/Workflows/Definition/WorkflowTargetDefinition.cs |
Added implicit operator from string |
DecSm.Atom/Workflows/Definition/Triggers/*.cs |
Removed empty lines from XML documentation examples |
DecSm.Atom/Workflows/Definition/Options/*.cs |
Removed empty lines from XML documentation examples |
DecSm.Atom/Variables/IWorkflowVariableProvider.cs |
Removed empty line from XML documentation |
DecSm.Atom/Util/ServiceStaticAccessor.cs |
Removed empty line from XML documentation |
DecSm.Atom/Secrets/*.cs |
Removed empty lines from XML documentation examples |
DecSm.Atom/Params/ParamDefinition.cs |
Added implicit operator to string |
DecSm.Atom/Hosting/*.cs |
Removed empty lines from XML documentation examples |
DecSm.Atom/DecSm.Atom.targets |
Simplified and updated to use MSBuildProjectDirectory |
DecSm.Atom/DecSm.Atom.props |
Added global using for Microsoft.Extensions.Logging |
DecSm.Atom/DecSm.Atom.csproj |
Changed .targets PackagePath from "build/" to "buildTransitive/" |
DecSm.Atom/Build/Definition/TargetDefinitionAttribute.cs |
Removed empty line from XML documentation |
DecSm.Atom/Build/Definition/MinimalBuildDefinitionAttribute.cs |
Deleted - consolidated into BuildDefinitionAttribute |
DecSm.Atom/Build/Definition/MinimalBuildDefinition.cs |
Updated documentation to reference BuildDefinitionAttribute |
DecSm.Atom.Tests/BuildTests/*/*.cs |
Updated all test builds to use [BuildDefinition] and explicit base class |
DecSm.Atom.SourceGenerators/_usings.cs |
Removed unused System.Diagnostics.CodeAnalysis global using |
DecSm.Atom.SourceGenerators/Parser.cs |
Deleted - logic moved into GenerateSolutionModelSourceGenerator |
DecSm.Atom.SourceGenerators/GenerateSolutionModelSourceGenerator.cs |
Complete rewrite using ForAttributeWithMetadataName and inline solution parsing |
DecSm.Atom.SourceGenerators/GenerateInterfaceMembersSourceGenerator.cs |
Refactored to use ForAttributeWithMetadataName and improved code organization |
DecSm.Atom.SourceGenerators/GenerateEntryPointSourceGenerator.cs |
Simplified using ForAttributeWithMetadataName |
DecSm.Atom.SourceGenerators/BuildDefinitionSourceGenerator.cs |
Major refactor with better organization, new WorkflowTargets and Params generation |
DecSm.Atom.SourceGenerators.Tests/Tests/BuildDefinitionSourceGeneratorTests.cs |
Updated tests to use [BuildDefinition] |
DecSm.Atom.SourceGenerators.Tests/Tests/*.verified.txt |
Updated verification snapshots to match new generated code format |
DecSm.Atom.Module.GithubWorkflows/Extensions.cs |
Added [PublicAPI] attributes to extension methods |
DecSm.Atom.Module.GithubWorkflows.Tests/Workflows/*.cs |
Updated to use [BuildDefinition] and WorkflowTargets API |
DecSm.Atom.Module.Dotnet/DecSm.Atom.Module.Dotnet.props |
Added global using for DecSm.Atom.Module.Dotnet.Helpers |
DecSm.Atom.Module.DevopsWorkflows.Tests/Workflows/*.cs |
Updated to use [BuildDefinition] and WorkflowTargets API |
DecSm.Atom.DotnetCliGenerator/Build.cs |
Updated to use [BuildDefinition] attribute |
Comments suppressed due to low confidence (4)
DecSm.Atom.Tests/BuildTests/BuildInfo/BuildInfoBuild.cs:20
- Downcasting 'this' from IBuildInfoTarget to BuildInfoBuild introduces a dependency cycle between the two types.
DecSm.Atom.Tests/BuildTests/BuildInfo/BuildInfoBuild.cs:21 - Downcasting 'this' from IBuildInfoTarget to BuildInfoBuild introduces a dependency cycle between the two types.
DecSm.Atom.Tests/BuildTests/BuildInfo/BuildInfoBuild.cs:22 - Downcasting 'this' from IBuildInfoTarget to BuildInfoBuild introduces a dependency cycle between the two types.
DecSm.Atom.Tests/BuildTests/BuildInfo/BuildInfoBuild.cs:23 - Downcasting 'this' from IBuildInfoTarget to BuildInfoBuild introduces a dependency cycle between the two types.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.