blob: 24637ecbe27df0435d81bd0a59adf33569151c7e [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.
40 * lyd_new_path() | ::lyd_new_path() | All options now in a single bitmap parameter of @ref newvaloptions.
41 * lyd_new_any() | ::lyd_new_any() | ^
42 * lyd_new_list() | ::lyd_new_list() | ^
43 * lyd_new_list2() | ::lyd_new_list2() | ^
44 * lyd_new_list3() | ::lyd_new_list3() | ^
45 * lyd_new_meta() | ::lyd_new_meta() | ^
46 * lyd_new_meta2() | ::lyd_new_meta2() | ^
47 * lyd_new_term() | ::lyd_new_term() | ^
48 * lyd_new_list3_bin() | ::lyd_new_list3() | Functionality now merged into the single function.
49 * lyd_new_list3_canon() | ^ | ^
50 * lyd_new_list_bin() | ::lyd_new_list() | Functionality now merged into the single function.
51 * lyd_new_list_canon() | ^ | ^
52 * lyd_new_term_canon() | ::lyd_new_term() | Functionality now merged into the single function.
53 *
54 *
55 *
56 * @section transition2_3Minor Other Minor Changes
57 *
58 * Except for the function changes below, ::lysc_type now has a copy of the typedef name, if applicable. There
59 * are use-cases when this information is needed even in the compiled schema tree such as checking the real type of
60 * a union value.
61 *
62 * libyang 2.x | libyang 3.0 | Notes
63 * :-------------------------|:-------------------------------------|:-------------------------------------------------------
64 * lyd_child() | ::lyd_child() | Now an inlined function for better performance.
65 * lyd_get_value() | ::lyd_get_value() | ^
66 * lyd_parent() | ::lyd_parent() | ^
67 * lyd_find_xpath4() | ::lyd_find_xpath3() | Previous lyd_find_xpath3 was removed to reduce symbols.
68 * lyd_target() | - | Deprecated.
69 * ly_ctx_reset_latests() | - | ^
70 *
71 */