fix(codegen): replace part argument 0 with LV_PART_MAIN in generated lv_obj_get/set_style_* calls for LVGL 9.40+ #868
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
LVGL ≥9.40 changed the second parameter of style get/set helpers from int to lv_part_t. The previous code generator emitted calls like lv_obj_get_style_opa(obj, 0) which now fail with: invalid conversion from 'int' to 'lv_part_t'. Added a post‑processing step in build.ts that rewrites any generated lv_obj_get_style_* and lv_obj_set_style_* calls using part 0 to LV_PART_MAIN. Backwards compatible with LVGL 8 (LV_PART_MAIN == 0).
i tested by building EEZ Studio and installing, Generated c files, and it work with arduino 9.40 out of box :)