Skip to content

Allow ignoring unknown metadata#360

Open
parched wants to merge 4 commits into
planus-org:mainfrom
parched:unknown-metadata
Open

Allow ignoring unknown metadata#360
parched wants to merge 4 commits into
planus-org:mainfrom
parched:unknown-metadata

Conversation

@parched
Copy link
Copy Markdown
Contributor

@parched parched commented May 6, 2026

Builds on #312

When using flatbuffers to share data between different languages
that have different generators there can be attributes that are specific
to one particular generator.
E.g., https://github.com/jamescourtney/FlatSharp/wiki/FBS-Annotations#flatsharp-fbs-extensions
In this case, the other generators should just ignore these attributes.

Note: implemented using AI

Checklist

  • Updated CHANGELOG.md with relevant changes
  • Added tests for any new/fixed functionality
  • Added/updated documentation for new/changed code
  • Checked that README.md still makes sense (and updated it if necessary)

parched and others added 4 commits May 6, 2026 13:27
Allow parsing union variant metadata, preserve it in CST/formatter, and reject it semantically
* Parse and keep metadata on union variants in the CST so formatting can round-trip it.
* Update formatter handling so union variant metadata is visible to formatting logic instead of being discarded.
* Add semantic validation that rejects union variant metadata with a clear error.
* Current behavior: union variant metadata syntax is accepted by the parser, but no metadata keys are supported semantically yet.

Note: AI was used in some of this.
When using flatbuffers to share data between different languages
that have different generators there can be attributes that are specific
to one particular generator.
E.g., https://github.com/jamescourtney/FlatSharp/wiki/FBS-Annotations#flatsharp-fbs-extensions
In this case, the other generators should just ignore these attributes.

Note: implemented using AI
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