Skip to content

Honor library.json source filters in shared library builds #1918

Closed

Description

@zackees

Shared library builds collect translation units without applying library.json build.srcFilter. An explicitly excluded implementation can therefore be compiled, including incompatible platform code.

Both the extra-project-library pipeline and declared-library manager use InstalledLibrary::get_source_files():

A real CI1306 regression being added to #1916 uses project-local Bridge and Leaf libraries. Leaf stores src/poison.cpp and excludes poison.cpp relative to its source directory, but native Nuclei GCC compiled it and reported #error library manifest source exclusion must be honored. This was an actual compiler failure, not a mock or timeout. The standard FastLED wrapper also needs the project-local-library route because it stages lib/FastLED rather than declaring lib_deps.

Expected: apply string/array manifest filters relative to srcDir, preserving ordered include/exclude rules and reporting malformed inputs. Share the existing filter grammar across project and library collection without a dependency cycle. Cover project-local and explicit dependency routes, cross-library linkage, and duplicate suppression; retain the real FastLED wrapper-layout test.

Primary semantics: https://docs.platformio.org/en/stable/manifests/library-json/fields/build/srcfilter.html

Build prerequisite for FastLED/FastLED#5024 and #1914; coordinated fix in #1916. This is separate from the 34 SPI/gate findings and does not establish physical timing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions