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

Minor API stabilization changes #1262

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

Lorak-mmk
Copy link
Collaborator

@Lorak-mmk Lorak-mmk commented Mar 3, 2025

  • Marked some enums as non_exhaustive, because we may want to add variants to them.
  • Marked internal_testing module as doc(hidden), otherwise it would show up at docs.rs

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.

Otherwise it will render in docrs - it uses all features.
@Lorak-mmk Lorak-mmk requested a review from wprzytula March 3, 2025 13:56
Copy link

github-actions bot commented Mar 3, 2025

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

See the following report for details:

cargo semver-checks output
./scripts/semver-checks.sh --baseline-rev 2764fc1d61ce83c4db5e0eff2db24dd2354b4454
+ cargo semver-checks -p scylla -p scylla-cql --baseline-rev 2764fc1d61ce83c4db5e0eff2db24dd2354b4454
     Cloning 2764fc1d61ce83c4db5e0eff2db24dd2354b4454
    Building scylla v0.15.0 (current)
       Built [  35.256s] (current)
     Parsing scylla v0.15.0 (current)
      Parsed [   0.051s] (current)
    Building scylla v0.15.0 (baseline)
       Built [  34.292s] (baseline)
     Parsing scylla v0.15.0 (baseline)
      Parsed [   0.048s] (baseline)
    Checking scylla v0.15.0 -> v0.15.0 (no change)
     Checked [   0.117s] 127 checks: 126 pass, 1 fail, 0 warn, 0 skip

--- failure enum_marked_non_exhaustive: enum marked #[non_exhaustive] ---

Description:
A public enum has been marked #[non_exhaustive]. Pattern-matching on it outside of its crate must now include a wildcard pattern like `_`, or it will fail to compile.
        ref: https://doc.rust-lang.org/cargo/reference/semver.html#attr-adding-non-exhaustive
       impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.39.0/src/lints/enum_marked_non_exhaustive.ron

Failed in:
  enum BatchStatement in /home/runner/work/scylla-rust-driver/scylla-rust-driver/scylla/src/statement/batch.rs:172
  enum TokenCalculationError in /home/runner/work/scylla-rust-driver/scylla-rust-driver/scylla/src/statement/prepared.rs:477
  enum PartitionKeyExtractionError in /home/runner/work/scylla-rust-driver/scylla-rust-driver/scylla/src/statement/prepared.rs:470

     Summary semver requires new major version: 1 major and 0 minor checks failed
    Finished [  70.960s] scylla
    Building scylla-cql v0.4.0 (current)
       Built [  11.026s] (current)
     Parsing scylla-cql v0.4.0 (current)
      Parsed [   0.028s] (current)
    Building scylla-cql v0.4.0 (baseline)
       Built [  10.790s] (baseline)
     Parsing scylla-cql v0.4.0 (baseline)
      Parsed [   0.028s] (baseline)
    Checking scylla-cql v0.4.0 -> v0.4.0 (no change)
     Checked [   0.114s] 127 checks: 127 pass, 0 skip
     Summary no semver update required
    Finished [  22.610s] scylla-cql
make: *** [Makefile:64: semver-rev] Error 1

I think we may need to add new variants to them in the future.
@Lorak-mmk Lorak-mmk changed the title Mark internal_testing as doc(hidden) Minor API stabilization changes Mar 3, 2025
@Lorak-mmk Lorak-mmk added this to the 1.0.0 milestone Mar 3, 2025
@github-actions github-actions bot added the semver-checks-breaking cargo-semver-checks reports that this PR introduces breaking API changes label Mar 3, 2025
@Lorak-mmk Lorak-mmk merged commit 6ca9a7c into scylladb:main Mar 3, 2025
12 checks passed
@Lorak-mmk Lorak-mmk mentioned this pull request Mar 4, 2025
8 tasks
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.

3 participants