Skip to content

Breaking change in v0.6.6 #16

Closed
Closed

Description

@xtqqczze

Problem

Version v0.6.6 introduces a breaking change to the public API but was released as a patch version, which violates semantic versioning.

Expected Behavior

Since this release contains a breaking change, it should be released as v0.7.0.

Proposed Solution

  • Yank the v0.6.6 release.
  • Re-release the changes as v0.7.0.

References

#15 (comment)

Activity

  1. cmpute commented on Oct 13, 2026

    @cmpute
    Owner

    What exactly is the 'breaking change to the public API'? A optional dependency version bump is usually not considered as a break change imo (at least for pre-1.0 packages)

  2. xtqqczze commented on Oct 13, 2026

    @xtqqczze
    ContributorAuthor

    impl ModularUnaryOps<&BigUint> for &BigUint is part of num-modular’s public API. The incompatible changes introduced in num-bigint therefore constitute a major breaking change, as they break downstream code that relies on this implementation.

    For example, the following compilation error occurs in num-prime:

    error[E0277]: the trait bound `for<'r, 'r> &'r num_bigint::BigUint: num_modular::ModularUnaryOps<&'r num_bigint::BigUint>` is not satisfied
       --> src/buffer.rs:573:51
        |
    573 |         let (factors, remainder) = buffer.factors(target.clone(), None);
        |                                           ------- ^^^^^^^^^^^^^^ the trait `for<'r, 'r> num_modular::ModularUnaryOps<&'r num_bigint::BigUint>` is not implemented for `&'r num_bigint::BigUint`
        |                                           |
        |                                           required by a bound introduced by this call
        |
        = help: the following other types implement trait `num_modular::ModularUnaryOps<Modulus>`:
                  <&mint::Mint<T, R> as num_modular::ModularUnaryOps<&mint::Mint<T, R>>>
                  <&num_bigint::biguint::BigUint as num_modular::ModularUnaryOps<&num_bigint::biguint::BigUint>>
                  <&u128 as num_modular::ModularUnaryOps<&u128>>
                  <&u16 as num_modular::ModularUnaryOps<&u16>>
                  <&u32 as num_modular::ModularUnaryOps<&u32>>
                  <&u64 as num_modular::ModularUnaryOps<&u64>>
                  <&u8 as num_modular::ModularUnaryOps<&u8>>
                  <&usize as num_modular::ModularUnaryOps<&usize>>
                and 8 others
    note: required for `&'r num_bigint::BigUint` to implement `for<'r> primality::PrimalityRefBase<num_bigint::BigUint>`
       --> src/primality.rs:381:15
        |
    381 | impl<T, Base> PrimalityRefBase<Base> for T where
        |               ^^^^^^^^^^^^^^^^^^^^^^     ^
    ...
    384 |         + for<'r> ModularUnaryOps<&'r Base, Output = Base>
        |           ------------------------------------------------ unsatisfied trait bound introduced here
    note: required by a bound in `buffer::PrimeBufferExt::factors`
       --> src/buffer.rs:124:24
        |
    118 |     fn factors<T: PrimalityBase>(
        |        ------- required by a bound in this associated function
    ...
    124 |         for<'r> &'r T: PrimalityRefBase<T>,
        |                        ^^^^^^^^^^^^^^^^^^^ required by this bound in `PrimeBufferExt::factors`
  3. cmpute commented on Oct 13, 2026

    @cmpute
    Owner

    alright, v0.7.0 published and 0.6.6 yanked

  4. xtqqczze commented on Oct 13, 2026

    @xtqqczze
    ContributorAuthor

    Thanks for this, and apologies for not making it clearer in #15.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions