Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(lvgl_private): remove unnecessary private header file includes #6418

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

FASTSHIFT
Copy link
Collaborator

@FASTSHIFT FASTSHIFT commented Jun 24, 2024

Description of the feature or fix

Hi, we upgraded LVGL on our system. Our CI encountered the problem that the upper-level application based on LVGL reported that ft2build.h (freetype compilation configuration file) could not be found.

After investigation, we found that lv_freetype_private.h was also exposed to the public space in lvgl_private.h (see this PR: #5913). The original design was that lv_freetype_private.h was only used internally in freetype porting layer, so only the directory where ft2build.h was located was exposed to LVGL. If lv_freetype_private.h was exposed to the public space, the compilation system would need to open the ft2build.h directory to all applications that use lvgl_private.h (and these programs originally only wanted to access display and indev), which is very likely to cause naming pollution and compilation conflicts!!!

I think lvgl_private.h should only contain necessary modules, rather than adding all *_private.h files for the sake of convenience. For new special requirements, we should package them into carefully designed public APIs, and eventually guide applications to gradually move away from lvgl_private.h.

Notes

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
@FASTSHIFT FASTSHIFT changed the title chore(lvgl_private): clean up unnecessary private header file includes chore(lvgl_private): remove unnecessary private header file includes Jun 24, 2024
@liamHowatt
Copy link
Collaborator

We are preparing to take the private convention much further in #6068.

I can appreciate removing Free type and Windows, but cache too?

CC @kisvegabor

@FASTSHIFT
Copy link
Collaborator Author

We are preparing to take the private convention much further in #6068.

I can appreciate removing Free type and Windows, but cache too?

CC @kisvegabor

I suggest deleting it first, and then adding it if the user really needs it.
cc @W-Mai

@kisvegabor
Copy link
Member

I see the problem, and agree to remove the private FreeType and Windows header. However, the cache is an internal LVGL thing. If the user wants all the LVGL stuff they can just include lvgl_private.h.

@FASTSHIFT
Copy link
Collaborator Author

I see the problem, and agree to remove the private FreeType and Windows header. However, the cache is an internal LVGL thing. If the user wants all the LVGL stuff they can just include lvgl_private.h.

OK, let's keep the cache private API.

@FASTSHIFT FASTSHIFT merged commit d009420 into lvgl:master Jun 26, 2024
19 checks passed
@FASTSHIFT FASTSHIFT deleted the chore_lvgl_private branch July 3, 2024 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants