Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding T: Bake bound on ZeroVec's Bake #3451

Merged
merged 4 commits into from
May 26, 2023

Conversation

robertbastian
Copy link
Member

Based on #3450

This bound is currently unused, but will be useful as part of #1935

}
Err(_) => {
env.insert("zerovec");
let u24 = u32::from_le_bytes([self.0[0], self.0[1], self.0[2], 0]);
Copy link
Member

Choose a reason for hiding this comment

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

Is there no bake here intentionally?

Copy link
Member Author

Choose a reason for hiding this comment

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

Somewhat, it's more code for the same result.

@robertbastian robertbastian removed request for snktd and dminor May 25, 2023 13:55
@Manishearth
Copy link
Member

Not opposed. Bit worried about how we can manage this for VZV, if at all, but we don't need to.

This is a breaking change in databake, though. I think it would be nice if we could mitigate that breakage for one release (let ICU4X's databake dep be a range dep for 1.3). Not blocking, and we can see what it looks like when we do a release.

@robertbastian
Copy link
Member Author

For VZV we'd probably want a &T: Bake bound or something. That's further out though.

The breaking in databake is in the other PR, no?

@jira-pull-request-webhook

This comment was marked as spam.

@Manishearth
Copy link
Member

Manishearth commented May 25, 2023

Oh, no, it's breaking zerovec. Same problem though.

@robertbastian
Copy link
Member Author

Meh, nobody uses the databake feature (at least there are no databake users on crates.io other than us).

@@ -8,7 +8,7 @@ use databake::*;

impl<T> Bake for ZeroVec<'_, T>
where
T: AsULE + ?Sized,
T: AsULE + ?Sized + Bake,
Copy link
Member

Choose a reason for hiding this comment

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

This new bound is a breaking change in zerovec. I don't care too much about it though because it only comes up if someone is using both zerovec and databake at the same time, and (most importantly) zerovec is pre-1.0.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, though we need to figure out if we want to follow semver and release a breaking zerovec bump.

@@ -15,7 +16,33 @@ impl<const N: usize> Bake for TinyAsciiStr<N> {
}
}

impl<const N: usize> databake::Bake for UnvalidatedTinyAsciiStr<N> {
Copy link
Member

Choose a reason for hiding this comment

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

Nit: Please mention these impls in the PR title.

@robertbastian robertbastian merged commit 51da740 into unicode-org:main May 26, 2023
@robertbastian robertbastian deleted the zvbake branch June 1, 2023 11:46
@Manishearth Manishearth mentioned this pull request Sep 21, 2023
13 tasks
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.

4 participants