Skip to content

Add embeds, file sets#116

Open
mwoehlke wants to merge 1 commit into
cps-org:masterfrom
mwoehlke:filesets-and-embed
Open

Add embeds, file sets#116
mwoehlke wants to merge 1 commit into
cps-org:masterfrom
mwoehlke:filesets-and-embed

Conversation

@mwoehlke

@mwoehlke mwoehlke commented Jun 8, 2026

Copy link
Copy Markdown
Member

Add attributes to support the C/C++ #embed directive which was recently standardized. Introduce a 'file set' object to the schema, with corresponding file_sets attribute. These are being combined mostly for the sake of the corresponding schema version bump, but 'embeds' are one of the supported file set types.

For now, file sets are primarily informative, offering a way for certain tools to match #include/#embed directives in consumer's sources to specific components, which is useful for various sorts of correctness validation ("linting").

Add attributes to support the C/C++ `#embed` directive which was
recently standardized. Introduce a 'file set' object to the schema, with
corresponding `file_sets` attribute. These are being combined mostly for
the sake of the corresponding schema version bump, but 'embeds' are one
of the supported file set types.

For now, file sets are primarily informative, offering a way for certain
tools to match `#include`/`#embed` directives in consumer's sources to
specific components, which is useful for various sorts of correctness
validation ("linting").
@mwoehlke mwoehlke force-pushed the filesets-and-embed branch from b23f883 to 72b9a68 Compare June 8, 2026 14:53
@nickelpro

Copy link
Copy Markdown
Collaborator

cc @dcbaker @grafikrobot @cfrankmiller

embeds I think should be fine, it's a direct analogy for includes for the new feature, mapping to the --embed-dir flag instead of -I.

Personally I'm fine with filesets going in. No one had strong objections to purely informative file sets. To be clear, this is in support of tools like link-what-you-include, which want to be able to map specific headers to specific components. It's not a build-correctness feature at the moment, for emission or consumption.

I'll hold off on approval in case anyone wants to raise strong objections.

@mwoehlke

mwoehlke commented Jun 8, 2026

Copy link
Copy Markdown
Member Author

Yeah, reasoning behind embeds was 1) trying to be proactive rather than reactive for a change, 2) consistency with embeds as a file set type, since we know we want it, and 3) the embeds attribute is a clearer candidate for a version bump, and doing them together means not worrying what sort of version bump file_sets on its own warrants, or likewise if embeds as a file set type was added later.

I was also planning to give this a week or so to "marinate", so we're on the same page there. 🙂

For now, I'm hoping to avoid allowing per-configuration file_sets, but that's something we can add later if it becomes necessary.

@dcbaker dcbaker left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me.

@nickelpro thanks for mentioning that filesets are for external tools ATM, I've had a string of conflicts with the call for the last couple of months and am a bit out of the loop.

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.

3 participants