You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by Christophe Le Saëc <ch...@gmail.com> on 2023/08/10 13:30:18 UTC

Generated code breaking change

Hello,

I've made this PR <https://github.com/apache/avro/pull/2435> to fix a bug
describe in this JIRA <https://issues.apache.org/jira/browse/AVRO-3749> that
describe some case, when schema contains fields with similar names (and
some start with '_') and generated code can't compile because some method
have same name. As for example, field with name 'f', 'F', '_f'.

The PR fix the issue but *comes with breaking change* in case of name
collision ('f' and 'F' are now transforms in getF() and getF$0() instead of
getF$0() and getF$1() as currently in main).

So, is it acceptable changes considering it only occurs in case of name
conflict ?

Regards,
Christophe

Re: Generated code breaking change

Posted by Christophe Le Saëc <ch...@gmail.com>.
PR is now merged

Le jeu. 17 août 2023 à 08:58, Christophe Le Saëc <ch...@gmail.com> a
écrit :

>
> So, if there is no objection on this breaking (see AVRO-3749
> <https://issues.apache.org/jira/browse/AVRO-3749>) change on generated
> code, i will merge this PR <https://github.com/apache/avro/pull/2435> this
> friday on afternoon.
>
> Kind regards,
> Christophe
>
> ---------- Forwarded message ---------
> De : Martin Grigorov <mg...@apache.org>
> Date: ven. 11 août 2023 à 12:40
> Subject: Re: Generated code breaking change
> To: <de...@avro.apache.org>
>
>
> On Thu, Aug 10, 2023 at 6:17 PM Oscar Westra van Holthe - Kind <
> oscar@westravanholthe.nl> wrote:
>
> > On Thu, 10 Aug 2023 at 15:30, Christophe Le Saëc <ch...@gmail.com>
> > wrote:
> >
> > > The PR fix the issue but *comes with breaking change* in case of name
> > > collision ('f' and 'F' are now transforms in getF() and getF$0()
> instead
> > of
> > > getF$0() and getF$1() as currently in main).
> > >
> > > So, is it acceptable changes considering it only occurs in case of name
> > > conflict ?
> > >
> >
> > As I have not encountered such naming collisions other than in very small
> > numbers, so I think it's perfectly acceptable.
> >
>
> Agreed!
> Even if it breaks someone's application I think it could be easily solved
> by using an alias.
>
>
> >
> > Does anyone have different experiences?
> >
> >
> > Kind regards,
> > Oscar
> >
> > --
> >
> > ✉️ Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>
> >
>

Fwd: Generated code breaking change

Posted by Christophe Le Saëc <ch...@gmail.com>.
So, if there is no objection on this breaking (see AVRO-3749
<https://issues.apache.org/jira/browse/AVRO-3749>) change on generated
code, i will merge this PR <https://github.com/apache/avro/pull/2435> this
friday on afternoon.

Kind regards,
Christophe

---------- Forwarded message ---------
De : Martin Grigorov <mg...@apache.org>
Date: ven. 11 août 2023 à 12:40
Subject: Re: Generated code breaking change
To: <de...@avro.apache.org>


On Thu, Aug 10, 2023 at 6:17 PM Oscar Westra van Holthe - Kind <
oscar@westravanholthe.nl> wrote:

> On Thu, 10 Aug 2023 at 15:30, Christophe Le Saëc <ch...@gmail.com>
> wrote:
>
> > The PR fix the issue but *comes with breaking change* in case of name
> > collision ('f' and 'F' are now transforms in getF() and getF$0() instead
> of
> > getF$0() and getF$1() as currently in main).
> >
> > So, is it acceptable changes considering it only occurs in case of name
> > conflict ?
> >
>
> As I have not encountered such naming collisions other than in very small
> numbers, so I think it's perfectly acceptable.
>

Agreed!
Even if it breaks someone's application I think it could be easily solved
by using an alias.


>
> Does anyone have different experiences?
>
>
> Kind regards,
> Oscar
>
> --
>
> ✉️ Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>
>

Re: Generated code breaking change

Posted by Martin Grigorov <mg...@apache.org>.
On Thu, Aug 10, 2023 at 6:17 PM Oscar Westra van Holthe - Kind <
oscar@westravanholthe.nl> wrote:

> On Thu, 10 Aug 2023 at 15:30, Christophe Le Saëc <ch...@gmail.com>
> wrote:
>
> > The PR fix the issue but *comes with breaking change* in case of name
> > collision ('f' and 'F' are now transforms in getF() and getF$0() instead
> of
> > getF$0() and getF$1() as currently in main).
> >
> > So, is it acceptable changes considering it only occurs in case of name
> > conflict ?
> >
>
> As I have not encountered such naming collisions other than in very small
> numbers, so I think it's perfectly acceptable.
>

Agreed!
Even if it breaks someone's application I think it could be easily solved
by using an alias.


>
> Does anyone have different experiences?
>
>
> Kind regards,
> Oscar
>
> --
>
> ✉️ Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>
>

Re: Generated code breaking change

Posted by Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>.
On Thu, 10 Aug 2023 at 15:30, Christophe Le Saëc <ch...@gmail.com> wrote:

> The PR fix the issue but *comes with breaking change* in case of name
> collision ('f' and 'F' are now transforms in getF() and getF$0() instead of
> getF$0() and getF$1() as currently in main).
>
> So, is it acceptable changes considering it only occurs in case of name
> conflict ?
>

As I have not encountered such naming collisions other than in very small
numbers, so I think it's perfectly acceptable.

Does anyone have different experiences?


Kind regards,
Oscar

-- 

✉️ Oscar Westra van Holthe - Kind <os...@westravanholthe.nl>