Skip to content
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

668 C# Generator Changes #669

Conversation

baseTwo
Copy link
Collaborator

@baseTwo baseTwo commented Jan 13, 2025

Work for #668

C# Generated Code

  1. Implement ILibrary as explicit in the C# generated code - so that they don't conflict with potential generated members
  2. Place regions around code blocks
  3. Remove the UTF8 Byte Order Marker (UTF-8 uses 1-byte code units, so there is no need for a BOM to indicate a byte order, because there is only 1 byte order possible, and the encoding algorithm determines the ordering of the bytes.)
  4. Fix generated tuple properties (See below TupleMetadataBuilder)

C# Generator

  1. Remove the exception handling callback
  2. Remove the callback for converting library name to class name. Use the VariableNameGenerator directly
  3. Rename LibrarySetDefinitionsToCSharpCodeProcessor to LibrarySetCSharpCodeGenerator
  4. Rename LibraryDefinitionToCSharpCodeProcessor to LibraryDefinitionCSharpCodeGenerator
  5. Rename IndentedWriter to IndentedTextWriter
  6. IndentedTextWriter to use the base type TextWriter instead of StreamWriter
  7. Upgrade version to 2.0.10

TupleMetadataBuilder

  1. The tuple metadata properties must be sorted alphabetically, to reduce changes when comiting to the repo
  2. Only generate the necessary tuple metadata properties that are needed for the particular library

MSBuild

  1. Remove the Generate-CQL-to-ELM and FullDebug build targets
  2. Add MSBuild variables in the props files for enabling building ELM (CqlToElmEnabled) or C# (ElmToCSharpEnabled)
  3. Update .Targets.xml files conditions for these new variables

@baseTwo baseTwo linked an issue Jan 13, 2025 that may be closed by this pull request
@baseTwo baseTwo marked this pull request as ready for review January 13, 2025 10:54
@baseTwo baseTwo requested a review from ewoutkramer January 13, 2025 10:54
@baseTwo baseTwo enabled auto-merge January 13, 2025 12:15
Demo/cql-demo.props Outdated Show resolved Hide resolved
cql-sdk.props Outdated Show resolved Hide resolved
@baseTwo baseTwo requested a review from ewoutkramer January 13, 2025 12:55
@baseTwo baseTwo merged commit daef0d6 into develop-2.0 Jan 13, 2025
2 checks passed
@baseTwo baseTwo deleted the 668-c-generated-code---fix-tuple-metadata-make-interface-impl-explicit branch January 13, 2025 13:08
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.

10 C# Code Generator Changes
2 participants