Versioned blobs, persistence naming, and SQL schemas in flux-versioned-types - #159
Merged
Merged
Conversation
alexX512
reviewed
Sep 14, 2026
| $crate::__versioned_telemetry_inner!($name, $dir => $($tokens)*); | ||
| }; | ||
| ($name:ident => $($tokens:tt)*) => { | ||
| $crate::__versioned_telemetry_inner!($name, stringify!($name) => $($tokens)*); |
Contributor
There was a problem hiding this comment.
Might be better don't allow to have persistable without manual specification of dir name? Because in our repos we sometimes have same name in different namesapaces like bundle::X, transaction::X and stringify!($name) will produce only X
alexX512
reviewed
Sep 14, 2026
| #[doc(hidden)] | ||
| macro_rules! __versioned_telemetry_inner { | ||
| ($name:ident, $dir:expr => $($tokens:tt)*) => { | ||
| $crate::evolve_struct! { |
Contributor
There was a problem hiding this comment.
Don't we use enums somewhere for versioned_telemetry? Because here is only struct impl
alexX512
reviewed
Sep 14, 2026
| metadata: &Metadata, | ||
| ) -> Self { | ||
| Self { | ||
| type_hash: T::TYPE_HASH ^ 123_456, |
Contributor
There was a problem hiding this comment.
Might be we can move that 123456 const to variable to use it in both encode/decode places? Tbh don't know why we even use it if hash already random
alexX512
approved these changes
Sep 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the builder telemetry machinery that is generic over metadata into flux: VersionedBlob (single latest on-disk format), InternalMetadata, TelemetrySchema plus its derive, and versioned_telemetry macros that always emit schemas with a name-derived, overridable persist directory.