Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we have two versions(deprecated old one and new) of the same node? #35545

Closed
lochana-chathura opened this issue Mar 23, 2022 · 2 comments
Closed
Labels
Area/SyntaxAPI Ballerina syntax API related issues #Compiler IceBox Older issues that are not being actively worked on but may be revisited in the future. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Task

Comments

@lochana-chathura
Copy link
Member

Description:
$subject.

We can have the two nodes with an is-a relationship.
e.g. Renaming BracedExpressionNode to ParenthesisedExpressionNode

  1. Extend the old node with the new one. BracedExpressionNode extends ParenthesisedExpressionNode
  2. Override the BracedExpressionNode methods to consume ParenthesisedExpressionNode methods underneath. If the method names also have changed.

Need to evaluate if this causes a lot of complications with treeModifiers, transformers, etc.

Also, we need to find a way to allow it via treegen.

@lochana-chathura lochana-chathura added Type/NewFeature Area/SyntaxAPI Ballerina syntax API related issues #Compiler labels Mar 23, 2022
@lochana-chathura lochana-chathura changed the title Can we have two versions(deprecated old one and new ) of the same node? Can we have two versions(deprecated old one and new) of the same node? Mar 23, 2022
@gimantha gimantha added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Jun 3, 2022
@hasithaa
Copy link
Contributor

hasithaa commented Oct 3, 2022

I think Option 1 is the safest and easy to migrate.

First, we extend the BracedExpressionNode with ParenthesisedExpressionNode and deprecate it. Also, we can update the usage of BracedExpressionNode to ParenthesisedExpressionNode.
After one or two updates we can remove the BracedExpressionNode.

@anupama-pathirage anupama-pathirage added the IceBox Older issues that are not being actively worked on but may be revisited in the future. label Nov 21, 2024
@anupama-pathirage
Copy link
Contributor

We are closing this issue due to inactivity. If you need further assistance or have additional input, feel free to reopen it. Thank you for helping us maintain a relevant and focused issue list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/SyntaxAPI Ballerina syntax API related issues #Compiler IceBox Older issues that are not being actively worked on but may be revisited in the future. Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. Type/Task
Projects
None yet
Development

No branches or pull requests

4 participants