Will Plantuml 1.2021.14 support for !define, !definelong? Any major syntax changes?

0 votes
asked Jan 12, 2022 in Question / help by anonymous

Hi,

I have seen the Migration Notes in https://plantuml.com/preprocessing

The following data is mentioned:You should not use !define and !definelong anymore. Use !function, !procedure or variable definition instead.

But currently its supporting !define and !definelong. Is this support permanent for plantuml 1.2021.14 version or will it be dropped? And if not will it be dropped only for future releases?

Also please let me know if there are any major syntax changes to be followed while using 1.2021.14

Thank you very much in advance.

 

1 Answer

0 votes
answered Jan 12, 2022 by plantuml (295,800 points)

You should not use !define and !definelong anymore. Use !function, !procedure or variable definition instead:
- !define should be replaced by return !function
- !definelong should be replaced by !procedure.
           
!include now allows multiple inclusions : you don't have to use !include_many anymore

!include now accepts a URL, so you don't need !includeurl

Some features (like %date%) have been replaced by builtin functions (for example %date())

When calling a legacy !definelong macro with no arguments, you do have to use parenthesis. You have to use my_own_definelong() because my_own_definelong without parenthesis is not recognized by the new preprocessor.
   

commented Jan 12, 2022 by anonymous

Hi,

Thanks for quick reply.

But !define and !definelong are  working for plantuml 1.2021.14. Here I need compatibility with even 1.2020.02 version also.

It was mention platuml.com migration notes that:
Even if some legacy features are still supported with the actual preprocessor, you should not use them any more (they might be removed in some long term future).

Does it mean the support will be removed in next coming releases or for existing 1.2021.14?

commented Jan 12, 2022 by plantuml (295,800 points)

Here I need compatibility with even 1.2020.02 version also.

I better understand now: you need backward compatibility

Does it mean the support will be removed in next coming releases or for existing 1.2021.14?

The support for !define/!definelong will be kept at least until 2023. So you can safely upgrade.

commented Jan 13, 2022 by anonymous

Hi thanks. one more question just to make it more clear.

The support will not be dropped till 2023 but after that if the support is dropped, will that effect next upcoming release or 1.2021.14? Because 1.2021.14 was already released and any new changes will be in next versions. Please correct me if I am wrong.

...