Kalle Niemitalo created AVRO-3614:
-------------------------------------

             Summary: Remove System.CodeGen dependency from main library
                 Key: AVRO-3614
                 URL: https://issues.apache.org/jira/browse/AVRO-3614
             Project: Apache Avro
          Issue Type: Wish
          Components: csharp
    Affects Versions: 1.11.1
            Reporter: Kalle Niemitalo


The Apache.Avro package on NuGet depends on the System.CodeDom package. I'd 
like this dependency to be removed so that I wouldn't have to distribute 
System.CodeDom with my applications, which encode and decode Avro data but do 
not generate source code at run time.

This would presumably require moving the code generation features from the 
Apache.Avro package to a new Apache.Avro.CodeGen package, which would be a 
breaking change.

In Avro 1.11.1, System.CodeDom is used by the Avro.CodeGen and Avro.CodeGenUtil 
classes. From those classes, only the CodeGen.GetNullableType, 
CodeGenUtil.UnMangle, and CodeGen.getType methods are used by the rest of the 
library. The CodeGen.getType method also depends on the CodeGenException class 
and the CodeGenUtil.Mangle method. None of those methods depend on 
System.CodeDom, so they could be moved to a new static class (perhaps named 
something like TypeUtil or ReflectionUtil) and kept in the main library.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to