-
Notifications
You must be signed in to change notification settings - Fork 76
0.8 -> 0.10 update broke my codebase #41
Comments
Thanks for your feedback. I'm sorry that my changes broke your code, but as hard as it sounds, I can't help you. I wrote mdcat for myself, as a simple CLI tool, and that's all I want from it, and just don't want to spent my time on someone else's use cases. I'm sorry but you're on your own if you're using mdcat as a library in your own code. I can try to help you a bit but please understand that I do not have the time to look at your code in detail. I don't think I understand your problem tho. As said I didn't look at your code, so excuse me if I'm asking a stupid question, but
|
I'm completely fine with that! I expected that reply! 😄
Because That's also why I need a new instance for each iteration.
Because of the |
I see. Perhaps push_tty doesn’t need to take ownership? I didn’t give much thought about it 💁♂️ Feel free to take a look, I’ll accept a pull request that improves the API 😊 |
I had a look. It is hard to rewrite everything so that |
@matthiasbeyer I don't know, the change was rather simple 🤷♂️ In the next release |
@matthiasbeyer 0.11 is out. Would appreciate feedback whether the changed API suites your needs now. |
Well yeah, I was able to update from 0.8 to 0.11. Thanks! |
You’re welcome 🙂 |
First of all: The title is a bit misleading. Of course a minor-version update is allowed to introduce breaking change and of course I'm not complaining about that, it is totally fine.
Second: I do not know whether this can be fixed at all, depending on what you want to do and where you want to go with that crate. So this is more of a feedback than of a real issue or a change request. Please do not think I want you to roll back to the old API design of the crate, I'm sure you had your reasons.
Now, lets go. I have this infrastructure of a
trait Viewer
, where a Viewer can view entries to either a terminal output or something else. I have aViewer
implementation which does markdown rendering and prints it withmdcat
.I'm in the process of updating
mdcat
from 0.8 to 0.10 - but as the API design changed, I cannot do this.First of all, I would need to fetch a new instance of
Terminal
in each iteration (in the implementation of theViewer::view_entry()
fn). I can do this:AnsiTerminal::new(sink)
, but assink
is not+ 'static
, it won't work. AsTerminal
is notClone
, I cannot get an instance of aTerminal
inMarkdownViewer::new()
and simply clone it tomdcat::push_tty()
...So right now I'm a bit lost here.
Maybe You have an idea how to solve this issue, maybe I will have to stick with the 0.8 version of
mdcat
.The text was updated successfully, but these errors were encountered: