[ 
https://issues.apache.org/jira/browse/AVRO-3427?focusedWorklogId=737526&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-737526
 ]

ASF GitHub Bot logged work on AVRO-3427:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 07/Mar/22 14:18
            Start Date: 07/Mar/22 14:18
    Worklog Time Spent: 10m 
      Work Description: kordos commented on pull request #1578:
URL: https://github.com/apache/avro/pull/1578#issuecomment-1060735692


   > The reason I am asking is that if you have only 1 or a very few schema 
files you work with, the chance for name collision is very small or 0. As soon 
as you have many schemas to compile, like many projects do, the chance for a 
type name collision is getting higher since you are flattening the directory 
structure. This is the main reason many C# source codes are following that 
pattern of matching the namespace with the directory structure.
   > 
   > Of course avrogen wont be really able to detect and report collisions, 
potentially causing the developer headache to figure out what went wrong, when 
the generated code does not even compile.
   > 
   > So this was the reason behind my question about what use case you try to 
cover with this feature ;)
   
   Namespace for classes isn't changed and classes are generated with full 
namespace. Just avrogen is putting them in wrong directory when directories 
have many namespaces in it (/foo.bar.api/ is a one directory) with current 
implementation of avrogen I have to generate classes, then manually move them 
from wrongly generated path to correct path, and manually remove wrong 
directories. It's very annoying and not the best user experience ;) Tool is not 
handling multi namespaces directories. In order to avoid that my change 
generate classes in output directory, without creating of namespace 
directories. I'm not sure if my clarification helps to understand the 
problem... 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 737526)
    Time Spent: 4h 20m  (was: 4h 10m)

> Add command line option to skip creation of directories based on namespace 
> path
> -------------------------------------------------------------------------------
>
>                 Key: AVRO-3427
>                 URL: https://issues.apache.org/jira/browse/AVRO-3427
>             Project: Apache Avro
>          Issue Type: Improvement
>          Components: csharp
>    Affects Versions: 1.11.0
>            Reporter: Paweł Kordowski
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 4h 20m
>  Remaining Estimate: 0h
>
> In java each part of the namespace is a separate directory but that's not the 
> case for C#.
> In C# you can have directory name that have many namespaces in it.
> For example:
> {noformat}
> Application.Manager.Api{noformat}
>  can be a single directory name. In Java it would be 3 separate directories 
> and because of that classes are generated under wrong path. it is placed in:
> {noformat}
> /Application/Manager/Api/{noformat}
> but it should be placed like here:
> {noformat}
> /Application.Manager.Api/{noformat}
> I think the best solution would be to add command line option that would skip 
> creation of directories based on namespace and it would just create classes 
> directly in pointed directory.
>  
> Regards,
> Pawel



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to