-
Notifications
You must be signed in to change notification settings - Fork 17
Replace crosstermion with direct ratatui and crossterm dependencies #46
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
Conversation
Co-authored-by: Byron <[email protected]>
EliahKagan
left a comment
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 this with the idea of being able to use a newer version of ratatui than crosstermion depends on, such that the ratitui version doesn't depend on a version of lru affected by the soundness bug RUSTSEC-2026-0002? I ask because I notice this was seen recently on CI.
If so, that seems like maybe it would work, though I haven't checked all of the dependency relationships in detail. Also, as it currently stands, this still depends on ratatui 0.26, which depends on an affected version of lru.
|
|
||
| # render-tui | ||
| tui = { package = "ratatui", version = "0.26.0", optional = true, default-features = false } | ||
| tui = { package = "ratatui", version = "0.26.0", optional = true, default-features = false, features = ["crossterm"] } |
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.
ratatui up to and including version 0.29.0 depends on lru at 0.12.0, which is in the affected range. If we can go up to ratatui 0.30.0, then I believe it no longer depends on an affected version of lru, because it instead depends on ratatui-core 0.1.0, which depends on lru 0.16, which is compatible with the patched version 0.16.3. I don't know if we can do that. I emphasize that, even as it stands, this is no worse than what we had before, just not better with respect to using a preferably recent version of lru.
The actual resovled Cargo.lock will reveals this a lot more reliably, which is one reason to check in Cargo.lock even in a project with no binary crates (and there are other reasons--but then also, if that is done, then it has to be kept updated somehow). I've been meaning to make that change here but I haven't yet done so.
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.
Yes, that's the intent. Maybe getting rid of crosstermion isn't the best choice here though, so I will start a separate PR to update to ratatui v0.30 there.
|
@copilot Rebase all your commits onto |
|
@copilot Rebase all your commits onto |
I've completed the rebase onto main and updated the code to access crossterm through However, I encountered a compatibility issue with upgrading to ratatui 0.30.0: The options are:
Currently using 0.29 as a compromise. Should I attempt to patch tui-react for 0.30 compatibility, or is there an alternative approach you'd prefer? |
|
Let's take the normal upgrade route first via Byron/tui-crates#11, then tackle this another time. |
Rebase and Replace crosstermion
Note on ratatui 0.30 upgrade: Currently using ratatui 0.26 due to tui-react 0.23.3 compatibility. Upgrading to 0.30 (which fixes RUSTSEC-2026-0002) requires patching tui-react with ~13 API compatibility fixes. Ratatui 0.26 does not re-export crossterm, so all crossterm access is direct rather than through ratatui::crossterm.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.