blob: 87e3dcfe3b2d1cfb117e56047a3cbdea848909bd [file] [log] [blame]
Michal Vaskob1319892024-02-26 16:15:40 +01001/**
2 * @page transition2_3 Transition Manual (2.x -> 3.0)
3 *
4 * [TOC]
5 *
6 * Non-backwards-compatible changes between libyang version 2 and 3 are rather minor and can be summarized as providing
7 * structured error information (instead of a single message), unifying **lyd_new_*()** function options, and some
8 * minor changes such as removing deprecated functions or making a few functions inlined. However, there is another
9 * large change that has not affected the API, specifically configuration system-ordered lists and leaf-lists are now
10 * ordered based on their keys/values, respectively. Except for moderately slower performance and negligible increased
11 * memory requirements, it should not affect existing applications (assuming they do not rely on the previous order of
12 * these instances).
13 *
14 * The complete generated list of changes (without any additional notes) can be found in
15 * <a href="../compat_report_2_3.html">the compatibility report</a>.
16 *
17 * @section transition2_3Logging Logging
18 *
19 * Except for some function adjustments, ::ly_err_item has been changed to provide every piece of error information in a
20 * separate member to allow for easier processing.
21 *
22 * Here is the overview of the changed / removed / added functions connected to logging.
23 *
24 * libyang 2.x | libyang 3.0 | Notes
25 * :-------------------------|:-------------------------------------|:-------------------------------------------------------
26 * ly_last_errmsg() | ::ly_last_logmsg() | Function renamed with the same functionality.
27 * ly_strerrcode() | ::ly_strerr() | Function renamed with the same functionality.
28 * ly_errcode() | - | Now requires ::ly_err_last() call.
29 * ly_errmsg() | - | ^
30 * ly_errpath() | - | ^
31 * ly_vecode() | - | ^
32 *
33 *
34 *
35 * @section transition2_3New Data Creation
36 *
37 * libyang 2.x | libyang 3.0 | Notes
38 * :-------------------------|:-------------------------------------|:-------------------------------------------------------
39 * lyd_find_xpath3() | ::lyd_find_xpath3() | Optional prefix data parameter added.
Michal Vaskoaa6b01c2024-02-27 08:38:27 +010040 * LYD_NEW_PATH_OUTPUT | ::LYD_NEW_VAL_OUTPUT | Some LYD_NEW_PATH_* options now also used for other lyd_new_* functions.
41 * LYD_NEW_PATH_BIN_VALUE | ::LYD_NEW_VAL_BIN | ^
42 * LYD_NEW_PATH_CANON_VALUE | ::LYD_NEW_VAL_CANON | ^
Michal Vaskob1319892024-02-26 16:15:40 +010043 * lyd_new_path() | ::lyd_new_path() | All options now in a single bitmap parameter of @ref newvaloptions.
44 * lyd_new_any() | ::lyd_new_any() | ^
45 * lyd_new_list() | ::lyd_new_list() | ^
46 * lyd_new_list2() | ::lyd_new_list2() | ^
47 * lyd_new_list3() | ::lyd_new_list3() | ^
48 * lyd_new_meta() | ::lyd_new_meta() | ^
49 * lyd_new_meta2() | ::lyd_new_meta2() | ^
50 * lyd_new_term() | ::lyd_new_term() | ^
51 * lyd_new_list3_bin() | ::lyd_new_list3() | Functionality now merged into the single function.
52 * lyd_new_list3_canon() | ^ | ^
53 * lyd_new_list_bin() | ::lyd_new_list() | Functionality now merged into the single function.
54 * lyd_new_list_canon() | ^ | ^
55 * lyd_new_term_canon() | ::lyd_new_term() | Functionality now merged into the single function.
56 *
57 *
58 *
59 * @section transition2_3Minor Other Minor Changes
60 *
61 * Except for the function changes below, ::lysc_type now has a copy of the typedef name, if applicable. There
62 * are use-cases when this information is needed even in the compiled schema tree such as checking the real type of
63 * a union value.
64 *
65 * libyang 2.x | libyang 3.0 | Notes
66 * :-------------------------|:-------------------------------------|:-------------------------------------------------------
67 * lyd_child() | ::lyd_child() | Now an inlined function for better performance.
68 * lyd_get_value() | ::lyd_get_value() | ^
69 * lyd_parent() | ::lyd_parent() | ^
70 * lyd_find_xpath4() | ::lyd_find_xpath3() | Previous lyd_find_xpath3 was removed to reduce symbols.
71 * lyd_target() | - | Deprecated.
72 * ly_ctx_reset_latests() | - | ^
73 *
74 */