Skip to content

Comments

feat: ltk_meta rework/reorg/etc#105

Merged
Crauzer merged 25 commits intomainfrom
alan/meta-rework
Feb 18, 2026
Merged

feat: ltk_meta rework/reorg/etc#105
Crauzer merged 25 commits intomainfrom
alan/meta-rework

Conversation

@alanpq
Copy link
Contributor

@alanpq alanpq commented Feb 12, 2026

lot of various API breaks including:

  • many renames
  • Map stores entries as Vec<(K, V)> now
  • Optional/Container are enums now to remove double tagging
  • all property values + the enum take a generic for optional metadata (e.g spans for ritobin/lsp/etc)

also has misc improvements idc enough to describe them theyre nice qol bumps

@alanpq alanpq marked this pull request as ready for review February 17, 2026 20:32
@alanpq alanpq requested a review from Crauzer February 17, 2026 20:32
@Crauzer Crauzer requested a review from Copilot February 17, 2026 20:34
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR restructures the ltk_meta crate API (Bin/property model) and updates ltk_ritobin to consume the new organization, including tests, examples, and snapshots.

Changes:

  • Replaced the old BinTree / BinTreeObject model with Bin / BinObject plus dedicated builders.
  • Reworked property value types into ltk_meta::property::values::* and updated parsing/writing code to use the new shapes.
  • Updated tests/snapshots/examples to match the new API and debug output.

Reviewed changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
crates/ltk_ritobin/src/writer.rs Updates ritobin text writer to new ltk_meta types (Bin, BinObject, new value wrappers).
crates/ltk_ritobin/src/types.rs Renames kind mapping from BinPropertyKind to PropertyKind.
crates/ltk_ritobin/src/parser.rs Updates ritobin text parser to new values::* and Bin structures; changes map/container handling.
crates/ltk_ritobin/examples/bin_to_rito.rs Example updated to read ltk_meta::Bin.
crates/ltk_meta/tests/snapshots/meta__read.snap Snapshot updated for new Bin/value debug shapes.
crates/ltk_meta/tests/meta.rs Tests updated to use Bin instead of BinTree.
crates/ltk_meta/src/tree/write.rs Moves writer impl from BinTree to Bin (versioning comments updated).
crates/ltk_meta/src/tree/tests.rs Updates round-trip tests to Bin/BinObject and new values::* constructors.
crates/ltk_meta/src/tree/read.rs Moves reader impl from BinTree to Bin and BinObject.
crates/ltk_meta/src/tree/object/builder.rs New builder for BinObject.
crates/ltk_meta/src/tree/object.rs Renames BinTreeObject to BinObject and factors builder into a module.
crates/ltk_meta/src/tree/builder.rs New builder for Bin.
crates/ltk_meta/src/tree.rs New top-level Bin module replacing the old bin_tree module.
crates/ltk_meta/src/traits.rs Renames/expands property traits (PropertyExt, PropertyValueExt, etc.) and updates kind IO helpers.
crates/ltk_meta/src/property/values/unordered_container.rs New UnorderedContainer value wrapper integrated with new trait system.
crates/ltk_meta/src/property/values/struct.rs Replaces StructValue with generic Struct<M> carrying metadata.
crates/ltk_meta/src/property/values/string.rs New String<M> value wrapper with meta support.
crates/ltk_meta/src/property/values/primitives.rs New primitive wrappers with value + meta fields and unified trait impls.
crates/ltk_meta/src/property/values/optional.rs New Optional<M> enum with typed variants and meta support.
crates/ltk_meta/src/property/values/none.rs New None<M> value wrapper (meta-capable).
crates/ltk_meta/src/property/values/map.rs Reworks map representation and read/write logic for the new property system.
crates/ltk_meta/src/property/values/embedded.rs New Embedded<M> wrapper around Struct<M>.
crates/ltk_meta/src/property/values/container/variants.rs New macros for container value variant lists and matching.
crates/ltk_meta/src/property/values/container/iter.rs New typed/dyn iterators for container items.
crates/ltk_meta/src/property/values/container.rs New typed Container<M> enum and read/write logic.
crates/ltk_meta/src/property/values.rs New values module re-export surface.
crates/ltk_meta/src/property/value/unordered_container.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/value/string.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/value/primitives.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/value/optional.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/value/none.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/value/mod.rs Removes legacy value module and old PropertyValueEnum definition.
crates/ltk_meta/src/property/value/embedded.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/value/container.rs Removes legacy value implementation (replaced by property::values).
crates/ltk_meta/src/property/kind.rs Renames BinPropertyKind to Kind and moves BinProperty to property.rs.
crates/ltk_meta/src/property/enum.rs New generic PropertyValueEnum<M> definition wired to new values.
crates/ltk_meta/src/property.rs New property module root (Kind, values, enum, BinProperty, NoMeta).
crates/ltk_meta/src/lib.rs Replaces old module layout exports with property + new tree (Bin) exports and docs.
crates/ltk_meta/src/error.rs Updates error kinds to reference Kind and adds container-related errors.
crates/ltk_meta/src/bin_tree/mod.rs Deletes legacy BinTree module (replaced by tree.rs).
Comments suppressed due to low confidence (1)

crates/ltk_meta/src/property/values/map.rs:42

  • Map<M> is generic over M, but entries is hard-coded to Vec<(PropertyValueEnum, PropertyValueEnum)> (default meta) rather than PropertyValueEnum<M>. This makes M ineffective for nested values and is inconsistent with Container<M> / Optional<M> which carry M through. Consider parameterizing entries with M (and adjusting helpers accordingly) or dropping M from Map if per-entry meta is intentionally unsupported.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Crauzer Crauzer merged commit ef60af9 into main Feb 18, 2026
1 check passed
@Crauzer Crauzer deleted the alan/meta-rework branch February 18, 2026 13:58
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.

2 participants