You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 5, 2024. It is now read-only.
Currently, we just disambiguate the crates compiled as dependencies of the old and new crate version. This has some issues, however: unchanged types from the two copies of a dependency aren't recognized as the same type, and various smaller issues appear.
A clean solution would be to determine the dependencies of both the old and the new crate, and to compile only one copy of each crate, preferably in a place where we don't interfere with any other tools and can reuse a maximum amount of work already done by cargo for previous compilations. After that, we can proceed to recursively determine matching crates and check them, until we reach the root crates. At this point we'd have all information needed to determine the change category of unchanged types from different crates.
The text was updated successfully, but these errors were encountered:
This is a major problem right now, we want to use this tool but I get a lot of false positives because we expose types from dependencies
i.e.:
error: breaking changes in `PublicKey`
--> /home/elichai2/gits/rust-bitcoin/src/util/key.rs:75:1
|
75 | / pub struct PublicKey{76 | | /// Whether this public key should be serialized as compressed 77 | | pub compressed:bool,78 | | /// The actual ECDSA key 79 | | pub key: secp256k1::PublicKey,80 | | }
| |_^
|
= warning:type error: expected struct `old::secp256k1::PublicKey`, found struct `new::secp256k1::PublicKey` (breaking):Changing the type of an item is a breaking change, because user code
using the item becomes type-incorrect.
on the other hand, if that dependency was bumped a major version then now it's a breaking change (because if a user is using that type then we now break his code)
Currently, we just disambiguate the crates compiled as dependencies of the old and new crate version. This has some issues, however: unchanged types from the two copies of a dependency aren't recognized as the same type, and various smaller issues appear.
A clean solution would be to determine the dependencies of both the old and the new crate, and to compile only one copy of each crate, preferably in a place where we don't interfere with any other tools and can reuse a maximum amount of work already done by cargo for previous compilations. After that, we can proceed to recursively determine matching crates and check them, until we reach the root crates. At this point we'd have all information needed to determine the change category of unchanged types from different crates.
The text was updated successfully, but these errors were encountered: