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

ci: automated update to rustc 1.83.0 #1776

Merged
merged 6 commits into from
Dec 17, 2024

Conversation

create-pr-actions[bot]
Copy link

@create-pr-actions create-pr-actions bot commented Dec 15, 2024

Automated update to Github CI workflow cont_integration.yml by create-pull-request GitHub action

I manually fixed new clippy warnings.

I also changed CI to:
1. not build or run tests or test dependencies when building with MSRV. This reduced the number of dependencies we need to pin for MSRV and fixes 1398. I removed these changes.
2. use the same version or rust as in the rust-version file for all jobs instead of just for clippy. I made this change to prevent CI breaks when stable changes before we have a chance to fix the auto created PR that bumps the rust-version file.

@notmandatory notmandatory added this to the 1.0.0-beta milestone Dec 16, 2024
@notmandatory notmandatory self-assigned this Dec 16, 2024
@notmandatory notmandatory force-pushed the create-pull-request/update-rust-version branch from 42f270a to ed88439 Compare December 16, 2024 01:54
@notmandatory
Copy link
Member

notmandatory commented Dec 16, 2024

This doesn't need to go into the final 1.0.0, but if folks have time to review it I'd like to get it in so:

  1. downstream projects using 1.83 don't get the new clippy warnings
    2. CI will build with MSRV without so many pinned dependencies I removed these changes.

@notmandatory notmandatory force-pushed the create-pull-request/update-rust-version branch 2 times, most recently from aa83307 to 74a7f73 Compare December 16, 2024 03:54
Copy link
Contributor

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

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

tACK 74a7f73

@@ -28,7 +28,7 @@ rusqlite = { version = "0.31.0", features = ["bundled"], optional = true }
rand = "0.8"
proptest = "1.2.0"
bdk_testenv = { path = "../testenv", default-features = false }
criterion = { version = "0.2" }
criterion = { version = "0.5" }
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not aware of the reason it has been downgraded to 0.2 by #1670, but I guess there might be some #:thinking:

Copy link
Member

@notmandatory notmandatory Dec 16, 2024

Choose a reason for hiding this comment

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

I manually ran the bench tests with criterion 0.5 and they still build and run so I think it's ok. @ValuedMammal do you know why we were using such an old version?

Copy link
Contributor

Choose a reason for hiding this comment

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

AFAICT on VM's initial PR it was using 0.5 🤔.

Copy link
Contributor

Choose a reason for hiding this comment

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

do you know why we were using such an old version?

I think it was only to get CI to pass using MSRV. I guess the issue didn't surface on #1735 because running the benches required a special invocation and so criterion was not automatically linked in with the build deps.

- name: Build
run: cargo build --workspace --exclude 'example_*' ${{ matrix.features }}
run: cargo build --workspace --exclude 'example_*' --exclude 'bdk_testenv' ${{ matrix.features }}
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm divided on this one, it surely helps not pinning on CI, but I'm unsure if we should test or not on MSRV toolchain 🤔.

Copy link
Member

Choose a reason for hiding this comment

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

Since we are keeping such an old MSRV and our test deps change so often I think this is the only way to manage it. But I'm open to move this to a different PR for after 1.0 if this is going to need more discussion.

@oleonardolima
Copy link
Contributor

@notmandatory It's probably needed to update the docs nightly toolchain too, see https://github.com/bitcoindevkit/bdk/actions/runs/12360406444/job/34495287138#step:7:307

Copy link
Contributor

@nymius nymius left a comment

Choose a reason for hiding this comment

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

I've run the workflows with act tool locally, but the output is not clear.
Though the CI is green, and have reviewed the output there.
If there are better ways to check this, please let me know.

Besides that, I have to research more about best practices on MSRV, as it seems to be another deep rabbit hole. The best material I have found so far is this discussion in the api guidelines repository of rust-lang. The stance adopted there seems to be in favor of pinning dependencies but in an alternative Cargo.lock.min file, which I think is not very different from what what was done here before, and I think is a path we should consider, probably against the original motivation of this PR.
However, I think these changes doesn't go in the opposite direction the link I mentioned above goes, and considering the project is still checking it builds against MSRV, my only concern here is the lack of testing this introduces for MSRV, so I wouldn't remove them unless there are strong reasons to remove the pinning and remove the testing in the way.

@notmandatory
Copy link
Member

notmandatory commented Dec 17, 2024

@notmandatory It's probably needed to update the docs nightly toolchain too, see https://github.com/bitcoindevkit/bdk/actions/runs/12360406444/job/34495287138#step:7:307

Good call. I updated the docs job to use rust nightly since the #[doc(cfg(…))] attribute (feature: doc_cfg) still isn't stabilized, see tracking issue: rust-lang/rust#43781.

@notmandatory notmandatory force-pushed the create-pull-request/update-rust-version branch from d4dc092 to b287325 Compare December 17, 2024 02:20
@notmandatory notmandatory force-pushed the create-pull-request/update-rust-version branch from b287325 to 272ce22 Compare December 17, 2024 02:46
@notmandatory
Copy link
Member

Besides that, I have to research more about best practices on MSRV, as it seems to be another deep rabbit hole.
...

I removed the commits that changed our MSRV testing and dependencies. I agree this is a rabbit hole that deserves more work to get right.

@notmandatory
Copy link
Member

I've run the workflows with act tool locally, but the output is not clear. Though the CI is green, and have reviewed the output there. If there are better ways to check this, please let me know.

I haven't tried the act tool, to test CI stuff I either push the changes in my PR or if it's someone else's PR and I want to try something different I push to my own bdk fork and let the Github CI run there.

This was referenced Dec 17, 2024
Copy link
Contributor

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

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

tACK 272ce22

Copy link
Contributor

@nymius nymius left a comment

Choose a reason for hiding this comment

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

tACK 272ce22

Copy link
Contributor

@ValuedMammal ValuedMammal left a comment

Choose a reason for hiding this comment

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

ACK 272ce22

@notmandatory notmandatory merged commit 1a6a78a into master Dec 17, 2024
43 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants