-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Conversation
1ab6f87
to
8ab346d
Compare
8ab346d
to
75819d6
Compare
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.
Is the idea that a particular client would now be able to only use solana-client-common
?
It sucks to see spinner.rs
in solana-client-common
though. If that could be moved elsewhere then solana-client-common
is looking pretty close to something like a solana-rpc-client-api
Yes, that's the idea.
Good point! Looks like I can split that file out to other places, and rename |
75819d6
to
c0c4db9
Compare
@mvines , done. Wdyt? |
aefdc49
to
4d50398
Compare
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 can split that file out to other places, and rename
solana-client-common
@mvines , done. Wdyt?
Looking better. I took the opportunity to nit some more!
5944853
to
468e68f
Compare
468e68f
to
8f45788
Compare
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.
looks great! i nitted it up. some can likely be done in followups, just need to reach consensus on nonce client rename (or 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.
thanks!
71bb808
to
df4e941
Compare
It's a good refactoring that does make it easier to understand the division of responsibilities, and does reduce some of the dependencies needed for those that don't need tpu-client in particular. Comparing the API surface of solana-client as it is on docs.rs and this I see these modules missing from the refactored crate:
These will be breaking changes. I don't know if that's a concern. With the way the module structure is outlined within the
This pattern of outlining the top-level modules within solona_client will require the module docs to be duplicated. I don't know if there are advantages that outweigh that disadvantage. I am happy to go in and touch up these docs myself later though if they are going to be blanked out by this PR. ClientErrorKind lost the FaucetError variant, a breaking change. |
Thank you, @brson !
I think I'm comfortable with the rpc_cache breakage, since
Ah, yeah, I did have the module docs duplicated, before I stripped out all those module files in c2c8635. I can restore those to the lib file. (edit) done in 5dc85fa
Correct, but I'm comfortable with this breakage as well, since there is no longer any path in our repo that utilizes this variant. |
c35cf80
to
b6c2fc5
Compare
b6c2fc5
to
54dc5c0
Compare
Are these new crates going to be released on crates.io? |
Yes. These changes are only in master so far, but once v1.15 moves to beta (testnet), the crates will be published. Or if we decide to backport these changes to the current beta branch in the meantime, they would also be published. |
Problem
The
solana-client
crate has become a kitchen sink of a lot of only loosely related apis. The result is that a user that wants to use a particular client has to pull in all the dependencies for all client types and utilities in the crate. This can be hard to manage in a large, complex monorepo.Summary of Changes
Split up solana-client into various new client crates with slimmed down dependencies. This is a noop, reorg only, with re-exports in
solana-client
for backward compatibility.While commits are intended to be sensibly distinct, they don't compile until Add client-common crate to avoid circular dependencies
Open to bike shedding on crate names, and opinions on organization.
Potential follow-up work before any backports:
solana-client
with specific client crateClientErrorKind
so that the common crate doesn't depend onreqwest
solana-tpu-client
so that quic- and udp-clients can be split to their own modules