Skip to content
New issue

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

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

Already on GitHub? # to your account

scylla_macros 0.2.2 introduced breaking changes with respect to 0.2.1 #891

Closed
piodul opened this issue Dec 21, 2023 · 1 comment · Fixed by #893
Closed

scylla_macros 0.2.2 introduced breaking changes with respect to 0.2.1 #891

piodul opened this issue Dec 21, 2023 · 1 comment · Fixed by #893
Assignees

Comments

@piodul
Copy link
Collaborator

piodul commented Dec 21, 2023

As evidenced here: Jasperav/Catalytic#43

[piodul@scyllapc scylla-rust-driver]$ git diff v0.10.0 v0.11.0 -- scylla-macros/src/value_list.rs
diff --git a/scylla-macros/src/value_list.rs b/scylla-macros/src/value_list.rs
index bf6fc38e..bc9de23c 100644
--- a/scylla-macros/src/value_list.rs
+++ b/scylla-macros/src/value_list.rs
@@ -17,7 +17,7 @@ pub fn value_list_derive(tokens_input: TokenStream) -> Result<TokenStream, syn::
     let generated = quote! {
         impl #impl_generics #path::ValueList for #struct_name #ty_generics #where_clause {
             fn serialized(&self) -> #path::SerializedResult {
-                let mut result = #path::SerializedValues::with_capacity(#values_len);
+                let mut result = #path::LegacySerializedValues::with_capacity(#values_len);
                 #(
                     result.add_value(&self.#field_name)?;
                 )*

The SerializedValues were renamed to LegacySerializedValues between scylla-macros@0.2.1 and scylla-macros@0.2.2.

This breaks existing projects that use scylla@0.10.x because they have dependency on scylla-cql = "0.0.9" (which has the name SerializedValues) and scylla-macros = "0.2.1" (which can get automatically upgraded to 0.2.2 which expects LegacySerializedValues).

The workaround for the existing projects is to specify the dependency exactly as =0.2.1, but the problem here already causes breakage for anybody that builds without a lockfile, so we should fix this ASAP.

Unfortunately, the most straightforward solution I see is to yank the currently released versions of the crates and re-release them with a minor version bump:

  • scylla-macros: yank 0.2.2, re-release it as 0.3.0; if we want to be extra nice we can also re-release 0.2.1 as 0.2.3 so that it will work for users who specified 0.2.2 in their dependencies already
  • scylla-cql: yank 0.0.10, update the scylla-macros depdendency version, re-release as 0.0.11 (cannot do minor bump here)
  • scylla: yank 0.11.0, update the scylla-macros and scylla-cql dependency version, re-release as 0.11.1

Preferably, we should do the releases first and only then yank in order to minimize breakage.

cc: @Lorak-mmk

This was referenced Dec 21, 2023
@Lorak-mmk Lorak-mmk linked a pull request Dec 21, 2023 that will close this issue
8 tasks
@Lorak-mmk
Copy link
Collaborator

Fixed today, in a way you described. No idea why this wasn't closed automatically, it was linked to a PR which was then merged.

@Lorak-mmk Lorak-mmk self-assigned this Dec 21, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants