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

Add Zebra crate versions to dev-dependencies, to enable crater tests #6924

Closed
3 tasks
teor2345 opened this issue Jun 12, 2023 · 6 comments · Fixed by #8171
Closed
3 tasks

Add Zebra crate versions to dev-dependencies, to enable crater tests #6924

teor2345 opened this issue Jun 12, 2023 · 6 comments · Fixed by #8171
Assignees
Labels
A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement C-testing Category: These are tests E-help-wanted Call for participation: Help is requested to fix this issue. good first issue S-needs-triage Status: A bug report needs triage

Comments

@teor2345
Copy link
Contributor

teor2345 commented Jun 12, 2023

Motivation

If we add versions to all of Zebra's dev-dependencies, our crates will get tested by Rust compiler team crater runs.

This helps prevent build and test failures caused by future Rust compiler versions.

Specifications

https://rustc-dev-guide.rust-lang.org/tests/crater.html

Also possibly the restrictions here, if they are still current:
https://www.reddit.com/r/rust/comments/f5xpib/psa_denywarnings_is_actively_harmful/

And we might need optional feature dependencies:

feature_name = ["optional_dep?/feature_if_dep_activated_by_another_feature"]

Changes

  • Add crate versions to all dev-dependencies on Zebra crates
    • Remove the tower-batch-control -> zebra-consensus circular dependency by copying those verifiers into tower-batch-control (and copying the tests into zebra-consensus so we're also testing the latest verifier code)
  • Make sure the tests that are on by default:
    • run reasonably fast
    • don't use too much network
    • (check crater docs for any other requirements)

Testing

This needs testing using cargo release, to make sure there aren't any other circular dependencies.

Related Work

Split off PR #6908 and ticket #6149.

@teor2345 teor2345 added A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage P-Medium ⚡ C-testing Category: These are tests labels Jun 12, 2023
@mpguerra mpguerra added this to Zebra Jun 12, 2023
@teor2345 teor2345 changed the title Add versions to dev-dependencies, to enable crater tests Add Zebra crate versions to dev-dependencies, to enable crater tests Jun 12, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra Jun 12, 2023
@mpguerra
Copy link
Contributor

@teor2345 teor2345 added good first issue E-help-wanted Call for participation: Help is requested to fix this issue. labels Jan 1, 2024
@bishopcheckmate
Copy link
Contributor

Hey, I would like to take on that.
I started checking and I think we could at this point just specify version = "1" for most relevant crates in dev-dependencies. Can you see any downside of this approach? I think it would a bit lower the maintenance burden

@arya2
Copy link
Contributor

arya2 commented Jan 15, 2024

Hey, I would like to take on that. I started checking and I think we could at this point just specify version = "1" for most relevant crates in dev-dependencies. Can you see any downside of this approach? I think it would a bit lower the maintenance burden

Thank you!

It gave me a build error when I tried this, prerelease package needs to be specified explicitly, but I don't see any downside here if it works. The maintenance burden should be trivial if it needs to be a specific version.

@bishopcheckmate
Copy link
Contributor

indeed it doesn't work for pre-release packages, tho it should work after 1.0.0. Anyway, I'll go with setting specific versions for now

@bishopcheckmate
Copy link
Contributor

can you assign this to me please for easier searching?

@bishopcheckmate
Copy link
Contributor

Also fyi since #8136 publishing will be blocked by zcash/librustzcash#1083 zcash/librustzcash#1088

@mpguerra mpguerra moved this from New to In progress in Zebra Jan 25, 2024
@mpguerra mpguerra moved this from In progress to Review/QA in Zebra Jan 29, 2024
@github-project-automation github-project-automation bot moved this from Review/QA to Done in Zebra Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement C-testing Category: These are tests E-help-wanted Call for participation: Help is requested to fix this issue. good first issue S-needs-triage Status: A bug report needs triage
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants