Enable cargo-semver-checks to catch accidental breakage of backwards compatibility.#2984
Enable cargo-semver-checks to catch accidental breakage of backwards compatibility.#2984adamreichold wants to merge 2 commits intomainfrom
Conversation
|
I also added this to all Clippy task because I assume that conditional compilation due to versions/platforms might be relevant for some edge cases? |
b477c1c to
f93fa0d
Compare
Actually, it is probably unlikely to depend on the platform. It might depend on CPython versus PyPy though? |
b5396fc to
711efe9
Compare
c974263 to
4231e99
Compare
4231e99 to
b6c076c
Compare
|
So besides cargo-semver-checks saying that our main branch should already be at 0.19.0 this seems to work and I think could be a valuable addition to our CI pipeline. However, to be really useful we would probably need to change our workflow w.r.t. maintenance releases, i.e. we would need a separate branch like |
|
Sorry for my long delay on reviewing this! So I agree this is definitely a useful tool to help us make server-compliant releases. Regarding 0.19 - I see the argument produced by the tool but additionally these are I've been gradually moving all of these hidden exports inside
This is a great idea. It may have the result that fewer additions would land in maintenance releases (as the additional overhead per-PR would probably mean we'd only ask fixes to target that branch). Maybe that's worth it to ensure we always land semver-compliant patch releases? |
|
As for adding this to CI... I think the |
Agreed, let's park this until the upstream issue on |
Features and platform changes can all affect the generated rustdoc, which is the data source Even if pyo3 itself doesn't have platform-based conditional compilation, one of its transitive dependencies might — and auto-traits can cause that to propagate silently. For example: imagine a type used in a private field of struct Of course, one might replace x86 and ARM with Linux, macOS, and Windows and get the same result. Whether this kind of platform risk is realistic or not requires a judgment call :)
I'd love to work with you on figuring out a good approach for But You might be able to move the |
Exactly, I was not making a categorical statement that such a dependency is impossible. I am trying to weigh the additional CI runtime cost versus the risk of missing semver violations. For the moment, I think having a lower cost to entry would bring the largest benefit to us as a project, i.e. a single CI job testing the "normal" kind of breakage caused by us making errors when we evaluate a change using a single target.
To be honest, that sounds like a large amount of code churn to get into a situation where we basically rely on the existence of a different upstream issue. Support for allow listing a set of path prefixes for changes, e.g. moving our hidden things into a single module, seems more reasonable IMHO. |
Yeah, you are not wrong :) Both |
|
For anyone following this thread: |
If I understand things correctly, we just need to make sure to bump the version on the topic branch and thereby main branch as soon as we make a breaking change?