-
Notifications
You must be signed in to change notification settings - Fork 224
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
Cleaner directory structure #7
Comments
I believe the case can be made here to use |
@marbar3778 yep, the whole thing can be a Cargo workspace with each folder representing an individual crate. They can be versioned together (e.g. |
Makes sense 👍 We should capture this in an ADR (#19). |
As of discussion on Sep 6: let's open a new repository for a "from scratch" version of tendermint Rust and implement that directory structure (logic structure skeleton) there. We discussed using crates with workspaces and adding all functionality as a skeleton. (Then using the current codebase to refactor and rethink into the new repo.) |
Referencing #19, Thane's idea for ADRs. Let's implement them in the new directory structure / repo:
|
I don't think we need a new repo. We seem to have 3 upcoming concerns:
For (1), we should support the current tendermint-rs as necessary, but don't necessarily need to re-org the internal directory structure. The For (2) we should make a new For (3), we should make a new I think working in this way should give us a better sense of if/when it will really help to refactor the tendermint-rs crate itself. We should probably summarize this and the current architectural state in an ADR |
@ebuchman if you'd like me to refactor the crate to match the directory structure you proposed, I wrote it and I'm an IntelliJ refactoring wizard, so it wouldn't take me that long |
Lol thanks for the offer. Do you think it's worth it? Also can you clarify the intention with having eg.
Probably worth considering the above and getting something in an ADR re the overall architecture before we refactor |
Moving |
Moving to the former may break your code in a future edition when the 2015 convention is eventually deprecated. |
@tarcieri Thanks for the clarification, this is insightful. |
Re the above:
Some thoughts/followup/questions here:
|
Re #289, the RPC client is the only thing in the |
I think it's OK to have one crate to use the light client as a library and one as a binary. The binary crate should also commit a Cargo.lock file: https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries That said, there is also still that |
Do you have more context to that? Maybe PRs or other issues? |
@xla fantastic! I can definitely make use of that in the KMS to selectively enable RPC for the features that need it |
Yes, we plan to deduplicate the code once the light client is finalized, and thus perhaps eventually drop the |
An alternative to the current light-client and light-node naming of the crates could be: |
It could be an alternative yet leaves room for interpretation as a cli could be utility to interact with a binary offering light client functionality. Usually node or daemon are more indicative. |
We could also consider putting the integration tests in a separate crate: Then, we could get rid of the dev-dependency to rpc inside of tendermint-rs. |
Is our current directory structure clean enough? @ebuchman |
Probably not :). There's obviously been lots of progress, especially with the serialization cleanup, but the |
Right now we have a ton of diverse functionality directly under
src
. Might be better to organize this a bit better, for instance, at a high level:Then for things like
and
we can probably consolidate further.
The text was updated successfully, but these errors were encountered: