Document Java migration tool#11385
Conversation
|
Waiting for runtime team review... |
Approved by Runtime Team |
|
@emirmx Is this for 11.12? |
It is a separate tool so not tied to 11.12 technically. |
|
@emirmx How long has it been available (as of which release)? If it is not tied to a specific release, can it be merged after review? |
The tool is not released yet. Should we ping you when the tool is released? |
|
@emirmx Yes, if it's not going out with 11.12 but is not yet live, then you can either leave a comment here or message me on Slack so I can merge the updates when it is available. Thank you! |
Thanks! |
52fb1a2 to
f54ff9a
Compare
f54ff9a to
604f3d8
Compare
|
We released the CLI tool to CDN, so this PR can be merged. |
MarkvanMents
left a comment
There was a problem hiding this comment.
Thanks for the PR @emirmx and @akkrishnakumar
I've proofread this here d85842a and have three questions/comments.
Please can you look at these and get back to me.
I'm OOO on Monday 6th but will be back on Tuesday 7th.
Please contact @quinntracy if this needs to be progressed on Monday.
| |---------|-------------| | ||
| | `version` | Display the tool version | | ||
| | `recipes` | List all available migration recipes | | ||
| | `rewrite <PATHS>` | Rewrite Java files that are in the given paths (files or folders) | |
There was a problem hiding this comment.
I think this could be clearer. Does it take files which are in /javasource and copy them to the rewrite PATHS or does it now only take files which are in rewrite <PATHS> and ignore all the others?
|
|
||
| Run the tool from a command prompt. Use the same Java version that the version of Studio Pro you are migrating to uses. You can find the Java installation path in Studio Pro's preferences. | ||
|
|
||
| The following example rewrites all Java files in the `javasource/` folder of your app to the target Studio Pro version: |
There was a problem hiding this comment.
And subfolders, or just the javasource folder
| {{% alert color="warning" %}} | ||
| Using `-p` and `-s` is strongly recommended. The tool relies on type binding resolution to apply recipes correctly. For example, it only rewrites `getMember` calls when it can confirm the receiver is an `IMendixObject`. Without these options, type information may be incomplete and recipes may not be applied. | ||
|
|
||
| For the same reason, the Java code in your project must be error-free as much as possible before running the tool. Missing imports, unresolved types, or variables declared without a fully qualified type name can prevent a recipe from recognizing a valid call site. |
There was a problem hiding this comment.
What does "as much as possible" mean here? Do you mean "only have errors related to deprecated and missing APIs?"
No description provided.