Document problems with multiple crossterm versions #876
Copy link
Copy link
Closed
Milestone
Description
It's possible to accidentally have two copies of crossterm with semver incompatible versions in an app / crate.
At a high level the known issues are:
- Terminal draw queries window size and waits for an event - different versions have different event queues. If these are on different threads then this event can be raced
- Enabling raw mode saves the cooked mode. Using a different version of crossterm than was used to save the cooked mode termios doesn't restore them correctly
- Any widget that relies on a specific version of crossterm may attempt to pass values to methods with the same type name, but different version. This will fail to compile
- Specific versions may make it difficult to upgrade widgets / ratatui versions unless everything is up to date
Mitigations
- ratatui-core to be introduced in ratatui 0.30. Moves the backends out of the main lib and allows changes to backend code to evolve at different pace to main lib
- feature flag backend versions to allow for different versions to be used. This sort of thing is fairly common when dealing with semver incompatible versions of libs that are generally code compatible.
Links from:
- FAQ
- Backends
- ratatui-crossterm
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
docs: document crossterm version compatibility (#1005)
docs: document crossterm version compatibility (#1005)