Skip to content

Migrate Bytes to u128 internally#515

Closed
jbaublitz wants to merge 3 commits into
stratis-storage:masterfrom
jbaublitz:u128-bytes
Closed

Migrate Bytes to u128 internally#515
jbaublitz wants to merge 3 commits into
stratis-storage:masterfrom
jbaublitz:u128-bytes

Conversation

@jbaublitz

Copy link
Copy Markdown
Member

Add support in macros for u128 internal representation in unit structs. Move Bytes over to u128.

There is a fair amount of added code and duplication in the macros as you cannot capture a type as a variable and then pattern match on it in a submacro so the types must be literals throughout the path travelled by the macro call stack. I would keep them all as variables if I didn't need to differentiate between .serialize_u64() and .serialize_u128() in the serde_macro!() body.

@jbaublitz
jbaublitz requested a review from mulkieran October 28, 2019 16:05
@jbaublitz jbaublitz self-assigned this Oct 28, 2019
@mulkieran

Copy link
Copy Markdown
Member

Must defer consideration until November...

@mulkieran

Copy link
Copy Markdown
Member

Moving to December along w/ companion PR.

@jbaublitz

Copy link
Copy Markdown
Member Author

I've added some significant macro clean up to what I originally did.

@jbaublitz

Copy link
Copy Markdown
Member Author

Rebased.

@jbaublitz

Copy link
Copy Markdown
Member Author

CI is repeatedly failing due to #557

@jbaublitz

Copy link
Copy Markdown
Member Author

This should also be ready due to rust-lang/rfcs#1504.

@mulkieran mulkieran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This looks generally good. I'm going over Mul, Div, and Rem very closely, as they are the most tricky for dimensionality and I've noted what looks like a problem w/ mul macro.

Comment thread src/range_macros.rs
@mulkieran

Copy link
Copy Markdown
Member

Looks good. Moving to pending while I do review of stratisd part: stratis-storage/stratisd#2341.

@mulkieran mulkieran left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ok, looks ready! Please close this and open a PR for final review.

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