Both [SortingNetwork] and [HybridSortingNetwork] generators silently skip unsupported element types (e.g., ypeof(decimal)) without any compiler warning or error. This can be confusing for users who expect code to be generated but get nothing.
Proposal
Emit a Roslyn diagnostic (warning or info) when an attribute specifies a type that is not in the supported set. For example:
[SortingNetwork(typeof(decimal))] // SN0001: 'decimal' is not a supported sorting network element type
partial class MySorter { }
This should apply to both attribute pipelines:
- SortingNetworkAttribute
- HybridSortingNetworkAttribute
Context
Discussed in PR #108 code review: #108 (comment)
Both [SortingNetwork] and [HybridSortingNetwork] generators silently skip unsupported element types (e.g., ypeof(decimal)) without any compiler warning or error. This can be confusing for users who expect code to be generated but get nothing.
Proposal
Emit a Roslyn diagnostic (warning or info) when an attribute specifies a type that is not in the supported set. For example:
This should apply to both attribute pipelines:
Context
Discussed in PR #108 code review: #108 (comment)