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

test against rust stable/nightly versions #14

Merged
merged 4 commits into from
Aug 14, 2024
Merged

Conversation

fursich
Copy link
Collaborator

@fursich fursich commented Aug 3, 2024

Our CI used to fix a (relatively old) version of rust to test against in order to make sure this crate can be used with any newer versions, but it causes sudden failure of CI when dependencies are updated, which is not nice to new contributors especially.

This PR is to test against the latest stable version, plus nightly only (Testing nightly may seem too much, so we could omit them if CI frequently fails)

@fursich
Copy link
Collaborator Author

fursich commented Aug 3, 2024

@kenkoooo -san

Would it be possible to get it merged? Seems like I lost admin role here, your help is very much appreciated 🙏

@@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
version: [1.68, stable]
version: [stable, nightly]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I completely agree with you that we should run tests not only on the "nightly" version but also on the "stable" version. If we want to support version 1.68 as the Minimum Supported Rust Version (MSRV), it would be best to include it in the CI.

Suggested change
version: [stable, nightly]
version: [1.68, stable, nightly]

Copy link
Collaborator Author

@fursich fursich Aug 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kenkoooo san

Thank you! As I stated above, it causes dependency version conflicts. (in particular, tokio in this case)

Maybe we could lock the dependency versions only for 1.68 testing, and use the latest crates for the stable/nightly, (some changes are required with CI matrixes settings..?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, we no longer support version 1.68. In that case, we might want to set another version as the MSRV. Which version should we specify as the new MSRV?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there are two options:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kenkoooo-san

Thanks for your advices!
I'm not very keen on updating MSRV for testing reason - we might have to update our CI everytime when tokio 1.xx changes its MSRV support. (which looks quite frequent).

I thought it should be nice to specify tokio 1.38.1 for MSRV testing only, while using the latest minor versions of dependencies for the latest stable rust. Would that make sense to you..?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(it seems I'm not having maintainership of this crate any more, so it would be great if you can approved it to get it merged. Thank you in advance..!)

@fursich fursich force-pushed the chore/ci-rust-versions branch from 2ecabbd to 7796ce9 Compare August 13, 2024 16:19
Comment on lines 27 to 30
# tokio 1.39+ requires rust <= 1.70.0
# https://github.com/tokio-rs/tokio?tab=readme-ov-file#supported-rust-versions
- run: cargo update -p tokio --precise 1.38.1
if: matrix.version == '1.68.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to consider updating the dev-dependencies to tokio = "=1.38.1" rather than updating the workflow. I feel that we don’t need to use the latest tokio in the stable version either, since it’s only used for testing.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I understand that's one of the suggestions you gave me earlier. I thought this crate is most likely to be used with tokio (for async loading) in real case anyway, and it might be nicer to test against arbitrary (latest) versions of tokio as well - what would you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s focus on what we want to ensure: that our async functions work as expected on any async runtime. We don’t need to prioritize compatibility with the latest version of tokio.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, that's a fair point. Thank you for your feedback and handling 🙏

Copy link
Member

@kenkoooo kenkoooo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Let me handle it.

@kenkoooo kenkoooo merged commit a5d8949 into main Aug 14, 2024
6 checks passed
@kenkoooo kenkoooo deleted the chore/ci-rust-versions branch August 14, 2024 04:35
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