Skip to content

Align minimum rust version to 1.86 #47

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

Merged
merged 2 commits into from
Jul 1, 2025
Merged

Align minimum rust version to 1.86 #47

merged 2 commits into from
Jul 1, 2025

Conversation

schneems
Copy link
Collaborator

@schneems schneems commented Jul 1, 2025

An issue was mentioned in heroku/buildpacks-deb-packages#110 (comment). This code was added in https://github.com/heroku-buildpacks/bullet_stream/pull/43/files and uses a feature of Rust 1.86 https://www.reddit.com/r/rust/comments/1ip51qt/trait_upcasting_stabilized_in_186/ (rust-lang/rust#134367).

This usage wasn't realized at the time. No lints or tooling caught it. That Any upcast is critical for the feature introduced in #43. The easiest path forward is to align the MSRV with the reality of the current code.

Semver version bump guidance from this thread to make this a minor change: https://users.rust-lang.org/t/rust-version-requirement-change-as-semver-breaking-or-not/20980/2.

GUS-W-18939940

An issue was mentioned in heroku/buildpacks-deb-packages#110 (comment). This code was added in https://github.com/heroku-buildpacks/bullet_stream/pull/43/files and uses a feature of Rust 1.86 https://www.reddit.com/r/rust/comments/1ip51qt/trait_upcasting_stabilized_in_186/ (rust-lang/rust#134367). 

This usage wasn't realized at the time. No lints or tooling caught it. That Any upcast is critical for the feature introduced in #43. The easiest path forward is to align the MSRV with the reality of the current code.


Semver version bump guidance from this thread to make this a minor change:
https://users.rust-lang.org/t/rust-version-requirement-change-as-semver-breaking-or-not/20980/2.
@schneems schneems force-pushed the schneems/fix-syntax branch from 16e3646 to 2a29479 Compare July 1, 2025 14:13
```
error: variables can be used directly in the `format!` string
   --> src/global.rs:678:9
    |
678 |         assert!(result.is_err(), "Expected panic to be caught {:?}", result);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#uninlined_format_args
    = note: `-D clippy::uninlined-format-args` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::uninlined_format_args)]`
help: change this to
    |
678 -         assert!(result.is_err(), "Expected panic to be caught {:?}", result);
678 +         assert!(result.is_err(), "Expected panic to be caught {result:?}");
    |

error: could not compile `bullet_stream` (lib test) due to 1 previous error
```
schneems added a commit to heroku/buildpacks-deb-packages that referenced this pull request Jul 1, 2025
More details in this PR to bullet_stream heroku-buildpacks/bullet_stream#47. And this comment reporting the issue #110 (comment).

The short version is: This buildpack uses a dependency that accidentally uses a feature stabilized in Rust 1.86, but it didn't correctly update the minimum required Rust version. If it had, when #115 was merged, it would have also triggered the change that's now being made (I'm guessing this field is not linted, but I've not verified). This change corrects the problem by correctly stating the minimum Rust version so all dependencies can compile correctly.
@schneems schneems marked this pull request as ready for review July 1, 2025 14:23
@schneems schneems requested a review from a team as a code owner July 1, 2025 14:23
@schneems schneems merged commit 485ab6a into main Jul 1, 2025
7 checks passed
@schneems schneems deleted the schneems/fix-syntax branch July 1, 2025 16:18
schneems added a commit to heroku/buildpacks-deb-packages that referenced this pull request Jul 1, 2025
* Update Rust minimum version to 1.86

More details in this PR to bullet_stream heroku-buildpacks/bullet_stream#47. And this comment reporting the issue #110 (comment).

The short version is: This buildpack uses a dependency that accidentally uses a feature stabilized in Rust 1.86, but it didn't correctly update the minimum required Rust version. If it had, when #115 was merged, it would have also triggered the change that's now being made (I'm guessing this field is not linted, but I've not verified). This change corrects the problem by correctly stating the minimum Rust version so all dependencies can compile correctly.

* Update CHANGELOG.md

Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Signed-off-by: Richard Schneeman <richard.schneeman+no-recruiters@gmail.com>

---------

Signed-off-by: Richard Schneeman <richard.schneeman+no-recruiters@gmail.com>
Co-authored-by: Ed Morley <501702+edmorley@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants