Skip to content

GH253: Fix generated alias compilation for addins in Cake.Sdk scripts - #254

Merged
devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-253
Oct 20, 2026
Merged

devlead merged 1 commit into
cake-build:developfrom
devlead:feature/gh-253

Conversation

@devlead

@devlead devlead commented Oct 20, 2026

Copy link
Copy Markdown
Member
  • Sanitize generated class names from assembly names with characters that are invalid in identifiers, e.g. Cake.Markdown-Pdf.
  • Emit generic constraints on alias wrappers, including unmanaged, notnull, class?, nullable constraint types and allows ref struct.
  • Emit enum defaults as member names or flags combinations, falling back to a cast.
  • Fix decimal, float and double literals, NaN and Infinity, and default for value types and type parameters.
  • Skip aliases whose signature references unresolved types and report CAKEGEN001.
  • Skip CakeNamespaceImport values that are not namespaces and report CAKEGEN002.
  • Read CakeNamespaceImport from the declaring class and assembly as well as the method.
  • Escape C# keyword identifiers in method, parameter, type parameter and property alias names.
  • Keep ref readonly parameters and forward them with in.
  • Add addin compatibility tests using in-memory fake addins, and reference the full shared framework in test compilations.

fixes #253

….Sdk scripts

- Sanitize generated class names from assembly names with characters that are invalid in identifiers, e.g. Cake.Markdown-Pdf.
- Emit generic constraints on alias wrappers, including unmanaged, notnull, class?, nullable constraint types and allows ref struct.
- Emit enum defaults as member names or flags combinations, falling back to a cast.
- Fix decimal, float and double literals, NaN and Infinity, and default for value types and type parameters.
- Skip aliases whose signature references unresolved types and report CAKEGEN001.
- Skip CakeNamespaceImport values that are not namespaces and report CAKEGEN002.
- Read CakeNamespaceImport from the declaring class and assembly as well as the method.
- Escape C# keyword identifiers in method, parameter, type parameter and property alias names.
- Keep ref readonly parameters and forward them with in.
- Add addin compatibility tests using in-memory fake addins, and reference the full shared framework in test compilations.
- fixes cake-build#253
@devlead
devlead enabled auto-merge October 20, 2026 18:14
@devlead
devlead disabled auto-merge October 20, 2026 18:21
@devlead
devlead merged commit 1646b1d into cake-build:develop Oct 20, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated Cake aliases fail to compile for several addins in Cake.Sdk scripts

1 participant