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

Add tests for Rust subleties #147

Closed
2 of 4 tasks
madsmtm opened this issue Aug 31, 2023 · 2 comments · Fixed by #153
Closed
2 of 4 tasks

Add tests for Rust subleties #147

madsmtm opened this issue Aug 31, 2023 · 2 comments · Fixed by #153
Labels
good first issue Good for newcomers

Comments

@madsmtm
Copy link
Member

madsmtm commented Aug 31, 2023

There are many small ways to break certain semver guarantees, and it would be nice if we could avoid making these mistakes; so let's add some tests to ensure that!

Add tests for:

  • Presence (or absence) of marker traits on types:
    • Send
    • Sync
    • UnwindSafe
    • RefUnwindSafe
    • Unpin
  • Contains interior mutability (e.g. disallowing placing something in a static)
  • Object safety on the traits we expose.
  • Variance of any lifetimes and/or generics we expose.

Possibly also: Integrate cargo-semver-checks in CI?

@madsmtm madsmtm added the good first issue Good for newcomers label Aug 31, 2023
@Lokathor
Copy link
Contributor

I run cargo-semver-checks on an actual publish but putting it in CI in some way is reasonable as well

@kchibisov
Copy link
Member

You could do doc tests for all of that like glutin does for example, we test Send/Sync and !Send/!Sync there to ensure semantics across the backends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
3 participants