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

Hygiene fixes for ser / deser macros #1176

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

Lorak-mmk
Copy link
Collaborator

@Lorak-mmk Lorak-mmk commented Jan 22, 2025

Removing old serialization / deserialization APIs requires migrating the hygiene integration test - this is one of very few places that still uses old APIs.
This makes such migration a prerequisite for #1167

While migrating the test I found that our new macros actually have many problems with hygiene. Who could expect that if we don't test something then it won't work...

Apart from hygiene fixes in macros one more change was required: moving types/serialize and types/deserialize modules in scylla_cql to, respectively, serialize and deserialize.
In other words, inlining types module. Why is it required? The tests assume that required traits are exposed under the same paths in scylla and scylla_cql, and the ability to make such
assumption is present in the documentation of the macros.

This PR fixes all the hygiene problems that I found, inlines types module, and migrates the hygiene test to new APIs.

Apart from that I significantly extended the test. Before it tested only most basic scenario, but our new macros have many variants and possible field attributes.
Doing this proved to be good idea, because I found and fixed even more issues in macros.

Ref: #1167

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • I added relevant tests for new features and bug fixes.
  • All commits compile, pass static checks and pass test.
  • PR description sums up the changes and reasons why they should be introduced.
  • I have provided docstrings for the public items that I want to introduce.
  • I have adjusted the documentation in ./docs/source/.
  • I added appropriate Fixes: annotations to PR description.

It contains only 2 submodules: serialize and deserialize.
In order to synchronize the paths of those modules with the scylla crate,
the types module is made private, and its submodules are re-exported.

fixup
This is required in order to get rid of types module.
Those are virtually top-level modules after previous commits, because
they are re-exported that way in lib.rs. The only thing needed is to
physically move the files.
It is now empty, so can be safely removed.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Macros need to use fully qualified paths in order to maintain hygiene.
Those constructors are needed for users that want to utilize our type
ser / deser functionality more directly.
There is no need to create whole PreparedMetadata in order to create
RowSerializationContext.
New version of the test verifies ser / deser identity for both row and
value macros.
This test was checking only the most basic scenario: a structure
that is serialized / deserialized by name matching, and has no field
attributes. Adding more advanced scenarios uncovered many hygiene issues
in the macros - those issues were fixed in previous commits.
@Lorak-mmk Lorak-mmk self-assigned this Jan 22, 2025
@github-actions github-actions bot added the semver-checks-breaking cargo-semver-checks reports that this PR introduces breaking API changes label Jan 22, 2025
Copy link

cargo semver-checks detected some API incompatibilities in this PR.
Checked commit: e87f598

See the following report for details:

cargo semver-checks output
./scripts/semver-checks.sh --baseline-rev 4a9367c1e1671773a704670de3c6acd089dc70d0
+ cargo semver-checks -p scylla -p scylla-cql --baseline-rev 4a9367c1e1671773a704670de3c6acd089dc70d0
     Cloning 4a9367c1e1671773a704670de3c6acd089dc70d0
    Building scylla v0.15.0 (current)
       Built [  23.640s] (current)
     Parsing scylla v0.15.0 (current)
      Parsed [   0.052s] (current)
    Building scylla v0.15.0 (baseline)
       Built [  23.464s] (baseline)
     Parsing scylla v0.15.0 (baseline)
      Parsed [   0.049s] (baseline)
    Checking scylla v0.15.0 -> v0.15.0 (no change)
     Checked [   0.109s] 107 checks: 107 pass, 0 skip
     Summary no semver update required
    Finished [  48.258s] scylla
    Building scylla-cql v0.4.0 (current)
       Built [  11.842s] (current)
     Parsing scylla-cql v0.4.0 (current)
      Parsed [   0.036s] (current)
    Building scylla-cql v0.4.0 (baseline)
       Built [  12.077s] (baseline)
     Parsing scylla-cql v0.4.0 (baseline)
      Parsed [   0.036s] (baseline)
    Checking scylla-cql v0.4.0 -> v0.4.0 (no change)
     Checked [   0.100s] 107 checks: 102 pass, 5 fail, 0 warn, 0 skip

--- failure enum_missing: pub enum removed or renamed ---

Description:
A publicly-visible enum cannot be imported by its prior path. A `pub use` may have been removed, or the enum itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/enum_missing.ron

Failed in:
  enum scylla_cql::types::serialize::value::SetOrListTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1315
  enum scylla_cql::types::serialize::value::ValueToSerializeValueAdapterError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1509
  enum scylla_cql::types::deserialize::value::TupleTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1588
  enum scylla_cql::types::serialize::value::BuiltinSerializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1202
  enum scylla_cql::types::serialize::value::TupleTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1357
  enum scylla_cql::types::deserialize::value::BuiltinDeserializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1768
  enum scylla_cql::types::serialize::row::ValueListToSerializeRowAdapterError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:718
  enum scylla_cql::types::deserialize::row::BuiltinTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:294
  enum scylla_cql::types::serialize::value::BuiltinTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1128
  enum scylla_cql::types::serialize::value::MapTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1267
  enum scylla_cql::types::deserialize::value::SetOrListDeserializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1855
  enum scylla_cql::types::serialize::value::SetOrListSerializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1333
  enum scylla_cql::types::deserialize::value::SetOrListTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1532
  enum scylla_cql::types::serialize::row::BuiltinTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:618
  enum scylla_cql::types::deserialize::value::TupleDeserializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1922
  enum scylla_cql::types::serialize::value::UdtTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1416
  enum scylla_cql::types::deserialize::value::UdtTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1639
  enum scylla_cql::types::serialize::row::BuiltinSerializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:681
  enum scylla_cql::types::serialize::value::MapSerializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1285
  enum scylla_cql::types::deserialize::value::BuiltinTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1467
  enum scylla_cql::types::deserialize::row::BuiltinDeserializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:443
  enum scylla_cql::types::serialize::value::TupleSerializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1392
  enum scylla_cql::types::serialize::value::UdtSerializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1480
  enum scylla_cql::types::deserialize::value::UdtDeserializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1955
  enum scylla_cql::types::deserialize::value::MapDeserializationErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1886
  enum scylla_cql::types::deserialize::value::MapTypeCheckErrorKind, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1560
  enum scylla_cql::types::deserialize::value::MaybeEmpty, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:107

--- failure function_missing: pub fn removed or renamed ---

Description:
A publicly-visible function cannot be imported by its prior path. A `pub use` may have been removed, or the function itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/function_missing.ron

Failed in:
  function scylla_cql::types::serialize::row::serialize_legacy_row, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:501
  function scylla_cql::types::serialize::value::serialize_legacy_value, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1019

--- failure module_missing: pub module removed or renamed ---

Description:
A publicly-visible module cannot be imported by its prior path. A `pub use` may have been removed, or the module may have been renamed, removed, or made non-public.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/module_missing.ron

Failed in:
  mod scylla_cql::types::deserialize::value, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1
  mod scylla_cql::types::serialize::writers, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:1
  mod scylla_cql::types::serialize::row, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:1
  mod scylla_cql::types, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/mod.rs:1
  mod scylla_cql::types::deserialize::row, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:1
  mod scylla_cql::types::deserialize, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/mod.rs:1
  mod scylla_cql::types::deserialize::frame_slice, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/frame_slice.rs:1
  mod scylla_cql::types::serialize, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/mod.rs:1
  mod scylla_cql::types::deserialize::result, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/result.rs:1
  mod scylla_cql::types::serialize::batch, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:1
  mod scylla_cql::types::serialize::raw_batch, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/raw_batch.rs:1
  mod scylla_cql::types::serialize::value, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/struct_missing.ron

Failed in:
  struct scylla_cql::types::deserialize::result::RawRowLendingIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/result.rs:152
  struct scylla_cql::types::deserialize::value::FixedLengthBytesSequenceIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1349
  struct scylla_cql::types::deserialize::value::MapIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:884
  struct scylla_cql::types::serialize::batch::BatchValuesIteratorFromIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:68
  struct scylla_cql::types::serialize::SerializationError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/mod.rs:39
  struct scylla_cql::types::serialize::batch::LegacyBatchValuesAdapter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:340
  struct scylla_cql::types::serialize::value::BuiltinTypeCheckError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1062
  struct scylla_cql::types::deserialize::result::RawRowIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/result.rs:13
  struct scylla_cql::types::serialize::value::BuiltinSerializationError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:1095
  struct scylla_cql::types::serialize::batch::BatchValuesFromIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:130
  struct scylla_cql::types::serialize::row::BuiltinTypeCheckError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:567
  struct scylla_cql::types::deserialize::DeserializationError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/mod.rs:278
  struct scylla_cql::types::deserialize::value::UdtIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1193
  struct scylla_cql::types::serialize::writers::WrittenCellProof, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:200
  struct scylla_cql::types::deserialize::value::BuiltinDeserializationError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1733
  struct scylla_cql::types::deserialize::value::BuiltinTypeCheckError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1417
  struct scylla_cql::types::deserialize::row::BuiltinTypeCheckError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:259
  struct scylla_cql::types::serialize::batch::LegacyBatchValuesIteratorAdapter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:364
  struct scylla_cql::types::deserialize::frame_slice::FrameSlice, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/frame_slice.rs:41
  struct scylla_cql::types::deserialize::FrameSlice, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/frame_slice.rs:41
  struct scylla_cql::types::serialize::row::SerializedValuesIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:883
  struct scylla_cql::types::deserialize::row::BuiltinDeserializationError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:416
  struct scylla_cql::types::deserialize::value::BytesSequenceIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:1383
  struct scylla_cql::types::serialize::writers::CellOverflowError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:223
  struct scylla_cql::types::serialize::writers::CellWriter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:75
  struct scylla_cql::types::serialize::CellWriter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:75
  struct scylla_cql::types::serialize::value::ValueAdapter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:984
  struct scylla_cql::types::deserialize::value::ListlikeIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:690
  struct scylla_cql::types::deserialize::TypeCheckError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/mod.rs:247
  struct scylla_cql::types::serialize::row::BuiltinSerializationError, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:593
  struct scylla_cql::types::serialize::row::RowSerializationContext, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:27
  struct scylla_cql::types::deserialize::result::TypedRowIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/result.rs:89
  struct scylla_cql::types::serialize::raw_batch::RawBatchValuesIteratorAdapter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/raw_batch.rs:132
  struct scylla_cql::types::deserialize::row::RawColumn, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:13
  struct scylla_cql::types::serialize::row::SerializedValues, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:746
  struct scylla_cql::types::serialize::row::ValueListAdapter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:453
  struct scylla_cql::types::serialize::writers::RowWriter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:11
  struct scylla_cql::types::serialize::RowWriter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:11
  struct scylla_cql::types::serialize::batch::TupleValuesIter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:222
  struct scylla_cql::types::deserialize::row::ColumnIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:21
  struct scylla_cql::types::serialize::writers::CellValueBuilder, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:136
  struct scylla_cql::types::serialize::CellValueBuilder, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/writers.rs:136
  struct scylla_cql::types::serialize::raw_batch::RawBatchValuesAdapter, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/raw_batch.rs:96

--- failure trait_missing: pub trait removed or renamed ---

Description:
A publicly-visible trait cannot be imported by its prior path. A `pub use` may have been removed, or the trait itself may have been renamed or removed entirely.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.38.0/src/lints/trait_missing.ron

Failed in:
  trait scylla_cql::types::deserialize::value::Emptiable, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:100
  trait scylla_cql::types::serialize::raw_batch::RawBatchValuesIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/raw_batch.rs:39
  trait scylla_cql::types::serialize::raw_batch::RawBatchValues, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/raw_batch.rs:17
  trait scylla_cql::types::serialize::batch::BatchValuesIterator, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:36
  trait scylla_cql::types::serialize::row::SerializeRow, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/row.rs:67
  trait scylla_cql::types::serialize::batch::BatchValues, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/batch.rs:17
  trait scylla_cql::types::deserialize::value::DeserializeValue, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:37
  trait scylla_cql::types::deserialize::DeserializeValue, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/value.rs:37
  trait scylla_cql::types::deserialize::row::DeserializeRow, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:90
  trait scylla_cql::types::deserialize::DeserializeRow, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/deserialize/row.rs:90
  trait scylla_cql::types::serialize::value::SerializeValue, previously in file /home/runner/work/scylla-rust-driver/scylla-rust-driver/target/semver-checks/git-4a9367c1e1671773a704670de3c6acd089dc70d0/d3c4f05ef9753d3aea6d72f5a92b05356782e7b7/scylla-cql/src/types/serialize/value.rs:36

     Summary semver requires new major version: 5 major and 0 minor checks failed
    Finished [  24.679s] scylla-cql
make: *** [Makefile:61: semver-rev] Error 1

@Lorak-mmk
Copy link
Collaborator Author

What is this failure in min_rust, why would Rust version have any impact here ?!!

@Lorak-mmk
Copy link
Collaborator Author

All of next calls in new macros use fully qualified syntax:
image

How could this possibly fail and why does it mention "tracing"????

error[E0599]: no method named `next` found for struct `tracing::field::Iter` in the current scope
   --> scylla/tests/integration/hygiene.rs:314:5
    |
314 |     test_crate!(scylla);
    |     ^^^^^^^^^^^^^^^^^^^ method not found in `Iter`
   --> /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/iter/traits/iterator.rs:112:8
    |
    = note: the method is available for `tracing::field::Iter` here
    |
    = help: items from traits can only be used if the trait is in scope
    = note: this error originates in the macro `$crate::valueset` which comes from the expansion of the macro `test_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
314 +     use std::iter::Iterator;
    |

error[E0599]: no method named `next` found for struct `tracing::field::Iter` in the current scope
   --> scylla/tests/integration/hygiene.rs:317:5
    |
317 |     test_crate!(scylla_cql);
    |     ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `Iter`
   --> /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/iter/traits/iterator.rs:112:8
    |
    = note: the method is available for `tracing::field::Iter` here
    |
    = help: items from traits can only be used if the trait is in scope
    = note: this error originates in the macro `$crate::valueset` which comes from the expansion of the macro `test_crate` (in Nightly builds, run with -Z macro-backtrace for more info)
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
317 +     use std::iter::Iterator;
    |

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-checks-breaking cargo-semver-checks reports that this PR introduces breaking API changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant