fix: improve AddonMemory deprecation error message with migration example#605
Conversation
bvdmitri
left a comment
There was a problem hiding this comment.
maybe also use the annotations as a variable name instead of addons
| """To migrate, replace:\n""" * | ||
| """ addons = (AddonMemory(),)\n""" * | ||
| """with:\n""" * | ||
| """ addons = (InputArgumentsAnnotations(),)\n""" * |
There was a problem hiding this comment.
| """ addons = (InputArgumentsAnnotations(),)\n""" * | |
| """ annotations = (InputArgumentsAnnotations(),)\n""" * |
|
Hlw @bvdmitri I have improved the This should help users like in RxInfer.jl#600 who were |
|
@bvdmitri thanks for the review.. While working on this I noticed the error message |
Would be great!
Not that I immediately can remember :) I think we can focus this PR on AddonLogScale |
| """and replaced by `LogScaleAnnotations`.\n""" * | ||
| """\n""" * | ||
| """To migrate, replace:\n""" * | ||
| """ annotations = (AddonLogScale(),)\n""" * |
There was a problem hiding this comment.
Here is the opposite, previously we called it addons, so the variable in the old code is most likely to be called addons
| """ annotations = (AddonLogScale(),)\n""" * | |
| """ addons = (AddonLogScale(),)\n""" * |
|
Updated Used addons as the variable name in the AddonLogScale migration example for consistency with the old API. |
|
Thanks @ArpanC6 ! |
Welcome.. |
What
Made the AddonMemory deprecation error message in
src/annotations/input_arguments.jl easier to understand.
Now it shows:
A simple example of what to change before/after
A direct link to the v5-to-v6 migration guide
Why
Before, the error message was confusing and didn’t tell users what to do (like in RxInfer.jl issue #600).
Now it clearly shows what code to replace and where to find help.
Changes
src/annotations/input_arguments.jl: updated the error message