[ 
https://issues.apache.org/jira/browse/IGNITE-25972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Roman Puchkovskiy updated IGNITE-25972:
---------------------------------------
    Description: 
Imagine a situation when we have an error code EC1, its name is ORIGINAL_NAME. 
Later, we decide that it would be better to name it differently, like 
BETTER_NAME. If just apply such a rename directly, this will break compilation 
of user's code using our clients (if the user's code references EC1 by name).

In such cases, we could do the following:
 # Rename EC1 definition (the one that registers error code in ErrorGroups) 
from ORIGINAL_NAME to BETTER_NAME
 # Create an alias of EC1 with the original name like public static final int 
ORIGINAL_NAME = BETTER_NAME; (initializing it directly instead of registering 
the error code)
 # Mark new new ORIGINAL_NAME field as @Deprecated.

This will probably require to adjust client-related (C#, C++) code generation 
tools.

  was:Imagine a situation when we have an error code EC1, its name is 
ORIGINAL_NAME. Later, we decide that it would be better to name it differently, 
like BETTER_NAME. If just apply such a rename directly, this will break 
compilation of user's code using our clients (if the user's code references EC1 
by name).


> Support error code aliases and deprecation
> ------------------------------------------
>
>                 Key: IGNITE-25972
>                 URL: https://issues.apache.org/jira/browse/IGNITE-25972
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Roman Puchkovskiy
>            Priority: Major
>              Labels: ignite-3
>
> Imagine a situation when we have an error code EC1, its name is 
> ORIGINAL_NAME. Later, we decide that it would be better to name it 
> differently, like BETTER_NAME. If just apply such a rename directly, this 
> will break compilation of user's code using our clients (if the user's code 
> references EC1 by name).
> In such cases, we could do the following:
>  # Rename EC1 definition (the one that registers error code in ErrorGroups) 
> from ORIGINAL_NAME to BETTER_NAME
>  # Create an alias of EC1 with the original name like public static final int 
> ORIGINAL_NAME = BETTER_NAME; (initializing it directly instead of registering 
> the error code)
>  # Mark new new ORIGINAL_NAME field as @Deprecated.
> This will probably require to adjust client-related (C#, C++) code generation 
> tools.



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

Reply via email to