Skip to content

Conversation

@zcsizmadia
Copy link
Contributor

Make sure you have checked all steps below.

Jira

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain Javadoc that explain what it does

Potentially fixes:

https://issues.apache.org/jira/browse/AVRO-2883
https://issues.apache.org/jira/browse/AVRO-3046

@zcsizmadia zcsizmadia marked this pull request as draft February 28, 2022 18:03
@github-actions github-actions bot added the C# label Feb 28, 2022
@zcsizmadia
Copy link
Contributor Author

zcsizmadia commented Feb 28, 2022

This rework changes how the namespace mapping is done. In this approach all the "namespace" definitions in the original schema definition text are replaced by the new mapped namespace name, before the schema is even parsed.

@zcsizmadia
Copy link
Contributor Author

@RyanSkraba @martin-g Added soem IMO cool integration tests for avrogen. It does the basic command line arguments test to ensure we dont break return codes, however the interesting one is GenerateSchemas:

  1. Generates cs files from th many avsc files
  2. Creates an empty dotnet console project with (dptnet new console -f currentFramework)
  3. Adds the current Avro.main library with packagereference
  4. Builds it with dotnet build
  5. Runs it to make sure the executable is runnable

It does these without namespace mapping, with simple namespace mapping and with namespace mapping where the mapped namespace has reserved words in it.

@zcsizmadia zcsizmadia marked this pull request as ready for review March 3, 2022 15:08
@zcsizmadia
Copy link
Contributor Author

zcsizmadia commented Mar 3, 2022

@martin-g I think it is ready for review:

Added several avrogen related tests:

  1. Command line sanity checks
  2. Exit codes
  3. Compiling several schema files and checking the generated types and source files, and directory structure
  4. Making sure that the generated code form the cs files can instantiate all the objects generated by avrogen
  5. Making sure that namespace mapping works as well (checking compilation, generated files, instantiating expected objects)
  6. Making sure that reserved keywords in namespaces or namespace mapping work as well (checking compilation, generated files, instantiating expected objects)
  7. Revived the disabled cunit tests which were commented out because of teh DOM compiler does not work on net core app (replaced by the runtime roslyn compiler)

@zcsizmadia zcsizmadia marked this pull request as draft March 10, 2022 01:25
@zcsizmadia zcsizmadia closed this Mar 20, 2022
@zcsizmadia zcsizmadia deleted the avro-3425-extend-namespace-mapping branch March 20, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant