-
Notifications
You must be signed in to change notification settings - Fork 347
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
Should we allow breaking changes to crate interfaces outside of major version bumps #3724
Comments
how this should probably work is that we featurize everything non-public under |
I like this idea and am in favor of it. We want separate crates within our repo for better organization and modularization, but this stuff really shouldn't be public. So,
Along this line, I think it would be interesting to hear what teams are using. We can certainly hear them out if they want us to move things out of internal feature (or really just have stable interface), but I think we need to protect our ability to clean things up and iterate quickly too |
On a similar line of thought, once |
junk drawer libraries are an anti-pattern |
The status quo is this random stuff scattered across |
it's simple. each crate that has public api has it's own sdk module where the public interface lives. everything else is private
|
anything that is a breaking change should follow semver, that way ecosystem developers can get a consistent experience across the solana stack (like any dev would expect with any other tool). the solana ecosystem and the agave client is mature enough for this. lets stop shooting application layer devs in the foot intended or not, some things are public and being used by the ecosystem. even if something was not meant to be public and used, it should only be removed (or made private) in a major version bump. if its public, some dev is bound to use it (like it or not). the only clean way to remove it (or make not public) is in a major version bump
wholeheartedly agree with @t-nelson here! it also helps keep iteration nimble like @steviez (and im sure the rest of the engineers) want. reduce the public surface area for any random person to use (because if its available, someone will inevitably use it for some reason). cut a new major version of each crate and make only the minimally desired things public. then continuing to follow semver becomes really easy
if the public surface area is reduced, then it should help keep iteration nimble. if its public, expect at least someone to use it for some random reason. therefore must follow semver |
Either I'm missing something in your response or I don't think you answered my question. Let's consider the type
Where does the type |
This is spiritually similar to what we do on the JavaScript side; types like |
PR 3377 has ignited a philosophical debate which warrants public input.
Context
The PR makes small breaking changes to the public interface on crates. The crates in question were not really intended to be a public interface, but we know they are being used directly outside of the Agave codebase.
The argument against PR 3377:
The interfaces are public, regardless of our preconceptions about which ones should be used. Since we're no longer in beta (v0.x) we should only break public interfaces with major version bumps. Changes like this should be rolled out with new functions that wrap the old ones and deprecations on the old functions.
The argument in favor of PR 3377:
We should only guarantee the interfaces on crates that we intended for public use. Developers interfacing directly with other crates can do so at their own risk. Introducing friction for changing interfaces reduces the likelihood that Agave developers will take the time to clean up existing code (eg functions with
#[allow(clippy::too_many_arguments)]
)The text was updated successfully, but these errors were encountered: