-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
8065664
to
7dad571
Compare
@@ -41,56 +39,6 @@ impl KeyManagerClient { | |||
} | |||
} | |||
|
|||
/// Wrapper around the Ekiden key manager client to provide a more convenient | |||
/// Ethereum address based interface along with runtime-specific utility methods. | |||
struct KeyManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What made you delete this? We still need it. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it was just not being used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is definitely used. See KeyManagerClient. We do some conditional compilation for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The e2e tests will fail if this is deleted.
.gitignore
Outdated
@@ -1,7 +1,7 @@ | |||
# Mac things | |||
.DS_Store | |||
|
|||
# Build. | |||
n# Build. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you added this by accident.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, let me fix it
.gitignore
Outdated
|
||
# in case credentials are put in the repo for using | ||
# inside the docker container | ||
.git-credentials |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Newline.
We should reconsider whether we want to use #![deny(warnings)] https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md At first glance, I think I'm ok with it. |
@armaniferrante that looks like a good alternative. Is there a specific set of warnings that you'd rather deny, like the one suggested in that link that the author says it's safe to deny? Or still deny all warnings? |
068fb77
to
51becc5
Compare
api/build.rs
Outdated
@@ -1,3 +1,5 @@ | |||
//! build crate for the ekiden api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All comments should start with capitalization and end with periods.
extern crate rayon; | ||
extern crate regex; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at all of these removed crates. Glorious. Are they removed from Cargo.toml
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't, but we could do that. I would prefer to do it in a separate PR if that's okay though :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why another PR? Might as well do it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me try then
@@ -0,0 +1,32 @@ | |||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity is this an exhaustive list? I assume not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got the list from here https://github.com/rust-unofficial/patterns/blob/master/anti_patterns/deny-warnings.md. It's not exhaustive since rust still adds/deprecates lints with quite some frequency. Based on that post, it looks like this is a reasonable set. Let me know if there's any other lint that you think should be added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is great to start. We can add/subtract as necessary in the future.
gateway/src/client.rs
Outdated
@@ -86,9 +85,11 @@ pub trait ChainNotify: Send + Sync { | |||
pub struct Client { | |||
client: runtime_ethereum::Client, | |||
engine: Arc<EthEngine>, | |||
#[allow(dead_code)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is dead can we delete it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks good to me. The only gripe I have is the usage of #[allow(dead_code)]. If possible, let's either delete such code or switch it to a conditional compilation. Let me know if neither are possible.
fc8e426
to
50ff694
Compare
@armaniferrante this is the error that we get if we don't allow dead_code for the key manager when running the cargo tests.
Let me know if there's a better way to fix this, otherwise we will have to live with allow dead code for now. |
50ff694
to
37e861f
Compare
Discussed offline. The conditional compilation for the KeyManager fixed the warnings. We don't need |
37e861f
to
51f0211
Compare
f50b47e
to
ca163f3
Compare
…auge/lint/warnings-as-errors
ca163f3
to
69aad5d
Compare
@@ -1,3 +1,5 @@ | |||
//! build crate for the ekiden runtime based enclave |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//! build crate for the ekiden runtime based enclave | |
//! Build crate for the ekiden runtime based enclave. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Filed https://github.com/oasislabs/runtime-ethereum/issues/590 as a followup to turn on "unused results". |
Address issue https://github.com/oasislabs/runtime-ethereum/issues/525
The best mechanism I've seen for now is to add
#![deny(warnings)]
in the top lib.rs file. I've seen that they are working on supporting alint
directive in the cargo.toml file but there's nothing yet rust-lang/cargo#5034