Skip to content

Commit

Permalink
build: bump rust to 1.80
Browse files Browse the repository at this point in the history
Cleans up some unused cfg_attrs that weren't previously generating
warnings. All are cosmetic, and don't affect application functionality.

Also adds the `rust-analyzer` component the rust-toolchain toml,
ensuring that the correct version of rust-analyzer (corresponding to the
channel specified in toolchain.toml) is used, so that developers
can easily hook up their IDEs.
  • Loading branch information
conorsch committed Aug 26, 2024
1 parent b858016 commit 15968d1
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 29 deletions.
2 changes: 1 addition & 1 deletion crates/bin/pindexer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ cometindex = {workspace = true}
num-bigint = { version = "0.4" }
penumbra-shielded-pool = {workspace = true, default-features = false}
penumbra-stake = {workspace = true, default-features = false}
penumbra-app = {workspace = true, default-features = false}
penumbra-app = {workspace = true}
penumbra-dex = {workspace = true, default-features = false}
penumbra-governance = {workspace = true, default-features = false}
penumbra-num = {workspace = true, default-features = false}
Expand Down
1 change: 1 addition & 0 deletions crates/core/app/tests/common/temp_storage_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use {
#[async_trait]
pub trait TempStorageExt: Sized {
async fn apply_genesis(self, genesis: AppState) -> anyhow::Result<Self>;
#[allow(dead_code)]
async fn apply_default_genesis(self) -> anyhow::Result<Self>;
async fn new_with_penumbra_prefixes() -> anyhow::Result<TempStorage>;
}
Expand Down
3 changes: 3 additions & 0 deletions crates/core/app/tests/common/test_node_ext.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// These mock-consensus helper traits aren't consumed just yet
#![allow(dead_code)]

use {
async_trait::async_trait, cnidarium::TempStorage, penumbra_mock_consensus::TestNode,
penumbra_sct::component::clock::EpochRead as _, tap::Tap,
Expand Down
3 changes: 3 additions & 0 deletions crates/core/app/tests/common/validator_read_ext.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// These mock-consensus helper traits aren't consumed just yet.
#![allow(dead_code)]

use {
async_trait::async_trait,
futures::TryStreamExt,
Expand Down
2 changes: 1 addition & 1 deletion crates/core/component/auction/src/component/auction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,5 +200,5 @@ pub(crate) trait AuctionCircuitBreaker: StateWrite {

impl<T: StateWrite + ?Sized> AuctionCircuitBreaker for T {}

#[cfg(tests)]
#[cfg(test)]
mod tests {}
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ pub trait AuctionStoreRead: StateRead {

impl<T: StateRead + ?Sized> AuctionStoreRead for T {}

#[cfg(tests)]
#[cfg(test)]
mod tests {}
8 changes: 0 additions & 8 deletions crates/core/component/governance/src/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,29 +202,21 @@ impl TryFrom<ProposalToml> for Proposal {

/// The specific kind of a proposal.
#[derive(Debug, Clone, Eq, PartialEq, Serialize, Deserialize)]
#[cfg_attr(feature = "clap", derive(clap::Subcommand))]
#[serde(try_from = "pb::ProposalKind", into = "pb::ProposalKind")]
pub enum ProposalKind {
/// A signaling proposal.
#[cfg_attr(feature = "clap", clap(display_order = 100))]
Signaling,
/// An emergency proposal.
#[cfg_attr(feature = "clap", clap(display_order = 200))]
Emergency,
/// A parameter change proposal.
#[cfg_attr(feature = "clap", clap(display_order = 300))]
ParameterChange,
/// A Community Pool spend proposal.
#[cfg_attr(feature = "clap", clap(display_order = 400))]
CommunityPoolSpend,
/// An upgrade proposal.
#[cfg_attr(feature = "clap", clap(display_order = 500))]
UpgradePlan,
/// A proposal to freeze an IBC client.
#[cfg_attr(feature = "clap", clap(display_order = 600))]
FreezeIbcClient,
/// A proposal to unfreeze an IBC client.
#[cfg_attr(feature = "clap", clap(display_order = 700))]
UnfreezeIbcClient,
}

Expand Down
4 changes: 0 additions & 4 deletions crates/core/component/governance/src/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,12 @@ use serde::{Deserialize, Serialize};
#[derive(Clone, Copy, Debug, Deserialize, Serialize, Eq, PartialEq)]
#[serde(try_from = "pb::Vote", into = "pb::Vote")]
#[cfg_attr(test, derive(proptest_derive::Arbitrary))]
#[cfg_attr(feature = "clap", derive(clap::Subcommand))]
pub enum Vote {
/// Vote to approve the proposal.
#[cfg_attr(feature = "clap", clap(display_order = 100))]
Yes,
/// Vote is to reject the proposal.
#[cfg_attr(feature = "clap", clap(display_order = 200))]
No,
/// Vote to abstain from the proposal.
#[cfg_attr(feature = "clap", clap(display_order = 300))]
Abstain,
}

Expand Down
2 changes: 1 addition & 1 deletion crates/crypto/proof-setup/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ anyhow = {workspace = true}
ark-ec = {workspace = true, default-features = false}
ark-ff = {workspace = true, default-features = false}
ark-groth16 = {workspace = true, default-features = false}
ark-poly = { version = "0.4.2", default_features = false }
ark-poly = { version = "0.4.2", default-features = false }
ark-relations = {workspace = true}
ark-serialize = {workspace = true}
blake2b_simd = {workspace = true}
Expand Down
2 changes: 0 additions & 2 deletions crates/util/tower-trace/src/trace/service_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ pub mod make {
_p: PhantomData<fn(T, R)>,
}

#[cfg(feature = "tower-layer")]
#[cfg_attr(docsrs, doc(cfg(feature = "tower-layer")))]
pub fn layer<T, R, G>(get_span: G) -> MakeLayer<T, R, G>
where
G: GetSpan<T> + Clone,
Expand Down
18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ dev:
fmt:
cargo fmt --all

# Runs 'cargo check' on all rust files in the project.
check:
RUSTFLAGS="-D warnings" cargo check --release --all-targets

# Render livereload environment for editing the Protocol documentation.
protocol-docs:
# Access local docs at http://127.0.0.1:3002
Expand Down
4 changes: 2 additions & 2 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[toolchain]
# We set a specific version of rust so that CI workflows use the same
# version development environments do.
channel = "1.75"
components = [ "rustfmt" ]
channel = "1.80"
components = [ "rustfmt", "rust-analyzer" ]
# Include wasm toolchain, for CI tests to check wasm32 build targets still work,
# to avoid downstream breakage in `penumbra-wasm` crate, in the web repo.
targets = [ "wasm32-unknown-unknown" ]

0 comments on commit 15968d1

Please sign in to comment.