A quick note on breaking changes #163
Replies: 7 comments 31 replies
-
+1 I just wrote something related in #122 regarding whether to add new methods to fix the places where we consume widget rather than borrowing it (and which probably applies throughout the entire library for things where we should use borrow or use
|
Beta Was this translation helpful? Give feedback.
-
I'm not particularly opposed to breaking changes, but we should at least note what they are and just how breaking they are. Something like the addition of an enum variant is far less disruptive than say a major refactor that changes how to construct an app. Even if the users are expecting breaking changes it's nice to at least tell them what we broke so they don't have to stare at diffs to track it down. I also think major changes should involve some discussion and feedback time from users - a couple reasons for this:
This library existed in stasis for a long time. Independent of some semantic versioning argument, lots of software exists for decades in a relatively stable state with a <1 version number. When it suddenly starts dropping breaking changes on a regular basis, it's annoying (at least, sometimes downright infuriating). I think it's worth being deliberate (not pausing breaking changes, just being deliberate) for a while to respect our users that might be surprised by the new revival. I know they have to make a conscious choice to switch from tui-rs to ratatui, but that change does not imply a sudden change in development cycles/patterns. |
Beta Was this translation helpful? Give feedback.
-
I really appreciate all the energy and excitement the new maintainers are showing here and believe this should lead to the best possible TUI library possible even if it entails breaking changes. Personally, I am happy with how my software looks like ( That said, I'd be happy to wait until 1.0 even and then upgrade everything at once, which should be straightforward as there is excellent documentation that lets me search for old names and trace forward to how its supposed to be used now. Doing this in little steps might be easier, but I'd only do so if forced (for instance, by CVEs or other issues due to outdated dependencies). Right now, I'd love to just keep things working for as long as possible. That said, there might be an opportunity here as well, as you could validate breaking changes against the top-list of your users. At the very least that would give them the upgrade to the next version for free, and at best you get to create even better/more convenient APIs. All the best! |
Beta Was this translation helpful? Give feedback.
-
One thing I thought to mention is - even entire programming languages do frequent breaking releases. How many apps use Java, for instance? And of those, how many are still on Java 8 because it works for their needs? And then you have languages like C++ who sacrifice correctness and ease of use for backward compatibility, which IMO is not something we should strive for. Of course, not all languages and software projects should do release cycles like Java, but it's not like the idea of having to modify your application to use new features is a foreign one to the development world. I don't think it should require weeks-long conversations/debates every time we need to rename a struct field. To reiterate past comments, I'm confused why we're talking about this crate like it's some sort of legacy software when it hasn't even had a major version release yet. |
Beta Was this translation helpful? Give feedback.
-
I find it really hard to find the right place to chime in, and guess a new top-level reply is the best option. As mentioned earlier, even though having no work with Making
The first point, not making breaking changes in a vacuum, deserves some more explanation as it to my mind gets to leverage the relatively small user-base of the Of course, this also means extra effort in understanding the code-bases of these To me, the outlook of more active and practice-oriented development is very exciting, as I believe it can lead to Rust finally getting the TUI crate it deserves (the best, of course 😁). Probably there are parts of the community that happily stay with I think a lot of what I am saying here is based on my experience with |
Beta Was this translation helpful? Give feedback.
-
The Spans -> Lines rename caused the following issues downstream:
These issues were brought to the attention of the owner by users attempting to install the tool using cargo install. It highlights that the problem we cause by breaking compatibility is not just one where we break our direct downstream developers using ratatui in their crates, but that we also break the users (or potential users) of the tools built with ratatui. I know that apps should include a Cargo.lock and should be installed using the |
Beta Was this translation helpful? Give feedback.
-
I'm just dropping by to comment that the only reason I'm here, using this crate, is because |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I just wanted to share some quick thoughts about breaking changes to the crate.
I think that we may be approaching making breaking changes with too much caution; it seems to be the case that the maintainers are loathe to implement them, which is entirely understandable. Breaking changes can make it a pain for users of the crate to keep up with releases if they want access to new features.
However, I believe that one of the important hallmarks of a pre-major-version (you could call it "beta" if applicable) project, is the ability to "move fast and break things." Of course, it should always be considered whether a feature is really necessary, but we've been left with a bit of an underbaked cake from the original
tui-rs
developers (no offense at all, we've all had projects we didn't truly finish) - and I think that it is often necessary for us to patch existing functionality or add new functionality in ways that are not conducive to backward compatibility.Overall, my point is that programmers who are not only using a beta crate, but also expecting to frequently update it for new features, should be ready to do revisions to their own code. And, if they do not wish to do so, they can simply not update the crate. Until we release
ratatui 1.0.0
, I don't think there is any point in being overly devoted to backward compatibility.I'm looking forward to hearing you guys' thoughts on this. I might be entirely off-base here, but I wanted to bring it up.
Beta Was this translation helpful? Give feedback.
All reactions