Skip to content

Fix build against LovyanGFX >= 1.2.x: drop redundant fonts alias - #60

Open
ps915 wants to merge 1 commit into
MatixYo:mainfrom
ps915:feature/fix-lovyangfx-fonts-conflict
Open

Fix build against LovyanGFX >= 1.2.x: drop redundant fonts alias#60
ps915 wants to merge 1 commit into
MatixYo:mainfrom
ps915:feature/fix-lovyangfx-fonts-conflict

Conversation

@ps915

@ps915 ps915 commented Jul 15, 2026

Copy link
Copy Markdown

LovyanGFX declares a global namespace fonts and a using namespace fonts; in lgfx/v1/lgfx_fonts.hpp. The namespace fonts = lgfx::v1::fonts; alias in three translation units collides with it:

error: 'namespace fonts = lgfx::v1::lgfx::v1::fonts;'
       conflicts with a previous declaration

The alias is redundant now that the library exposes fonts globally, so remove it rather than pinning the dependency backwards.

CI does not catch this: the cache key falls back to restore-keys ${{ runner.os }}-pio-, restoring a libdeps tree whose older LovyanGFX still satisfies ^1.2.7. A fresh checkout resolves 1.2.25 and fails to compile.

Verified: pio run -e supermini succeeds (RAM 15.5%, Flash 39.4%).

LovyanGFX declares a global `namespace fonts` and a `using namespace fonts;`
in lgfx/v1/lgfx_fonts.hpp. The `namespace fonts = lgfx::v1::fonts;` alias in
three translation units collides with it:

    error: 'namespace fonts = lgfx::v1::lgfx::v1::fonts;'
           conflicts with a previous declaration

The alias is redundant now that the library exposes `fonts` globally, so
remove it rather than pinning the dependency backwards.

CI does not catch this: the cache key falls back to restore-keys
`${{ runner.os }}-pio-`, restoring a libdeps tree whose older LovyanGFX still
satisfies `^1.2.7`. A fresh checkout resolves 1.2.25 and fails to compile.

Verified: pio run -e supermini succeeds (RAM 15.5%, Flash 39.4%).
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.

1 participant