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

Implement generic CLI query connection end #405

Merged

Conversation

thaodt
Copy link
Contributor

@thaodt thaodt commented Aug 15, 2024

Part of #393.

Description

Following the guideline in issue description to do it.

This PR is still in-draft but I have 1 question for you @soareschen. I'm getting this error:

error[E0308]: mismatched types
  --> crates/cli/cli-components/src/impls/commands/queries/connection_end.rs:88:31
   |
49 | impl<App, Args, Build, Chain, Counterparty> CommandRunner<App, Args>
   |                        -----  ------------ expected type parameter
   |                        |
   |                        found type parameter
...
88 |         Ok(app.produce_output(connection_end))
   |                -------------- ^^^^^^^^^^^^^^ expected type parameter `Counterparty`, found type parameter `Chain`
   |                |
   |                arguments to this method are incorrect
   |
   = note: expected associated type `<Counterparty as hermes_relayer_components::chain::traits::types::connection::HasConnectionEndType<Chain>>::ConnectionEnd`
              found associated type `<Chain as hermes_relayer_components::chain::traits::types::connection::HasConnectionEndType<Counterparty>>::ConnectionEnd`
   = note: a type parameter was expected, but a different one was found; you might be missing a type parameter or trait bound
   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters
   = note: an associated type was expected, but a different one was found
note: method defined here
  --> crates/cli/cli-components/src/traits/output.rs:10:8
   |
10 |     fn produce_output(&self, value: Value) -> Self::Output;
   |        ^^^^^^^^^^^^^^

I guess it relates to one of traits I used in Chain & Counterparty when implementing for RunQueryConnectionEndCommand but I still didn't figure out what's wrong in my implementation. Can you please point it out for me? Thanks.

Copy link
Collaborator

@soareschen soareschen left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution! I have added notes on how you can fix the errors.

@thaodt thaodt force-pushed the thao/cli-query-connection-end branch from 43c931b to 2c7ed93 Compare December 5, 2024 06:39
@thaodt thaodt requested a review from soareschen December 5, 2024 06:46
@thaodt thaodt marked this pull request as ready for review December 5, 2024 06:46
@thaodt thaodt force-pushed the thao/cli-query-connection-end branch from 2c7ed93 to b222aa6 Compare December 5, 2024 11:13
@thaodt
Copy link
Contributor Author

thaodt commented Dec 6, 2024

@soareschen I finished the PR, hopefully we can get it merged. ^^

@soareschen soareschen merged commit 1007973 into informalsystems:main Dec 6, 2024
12 checks passed
@soareschen
Copy link
Collaborator

Merged now. Thank you for your contribution!

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