Skip to content

Conversation

@orhun
Copy link

@orhun orhun commented Nov 21, 2025

`anstyle-ratatui` depends on `unicode-width =0.2.0` which creates
an incompatibility

```
error: failed to select a version for `unicode-width`.
    ... required by package `ratatui v0.29.0`
    ... which satisfies dependency `ratatui = "^0.29.0"` of package `anstyle-ratatui v0.1.0 (/home/orhun/gh/anstyle/crates/anstyle-ratatui)`
versions that meet the requirements `=0.2.0` are: 0.2.0

all possible versions conflict with previously selected packages.

  previously selected package `unicode-width v0.2.2`
    ... which satisfies dependency `unicode-width = "^0.2.2"` of package `anstyle-svg v0.1.12 (/home/orhun/gh/anstyle/crates/anstyle-svg)`

failed to select a version for `unicode-width` which could resolve this conflict
```
anstyle-lossy = { version = "1.0.0", path = "../anstyle-lossy" }
html-escape = "0.2.13"
unicode-width = "0.2.2"
unicode-width = "0.2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does ratatui use a =? Those are generally discouraged by the Cargo team for being harmful to the community

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From what I gather for ratatui, it was just a superficial test failure and not a major behavior issue? If so, then that imo is appropriate to use your own lockfile to pin but inappropriate to pin for dependents and cause conflicts.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue was more than just failing tests. IIRC the unicode-width versions that were in question were not semver compatible and we didn't want to silently break the behavior for upstream users by updating unicode-width.

(cc @joshka feel free to clarify if I'm misremembering things)

@coveralls
Copy link

Pull Request Test Coverage Report for Build 19570729873

Details

  • 0 of 112 (0.0%) changed or added relevant lines in 1 file are covered.
  • 2 unchanged lines in 1 file lost coverage.
  • Overall coverage decreased (-2.3%) to 51.997%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/anstyle-ratatui/src/lib.rs 0 112 0.0%
Files with Coverage Reduction New Missed Lines %
crates/anstyle/src/effect.rs 2 48.39%
Totals Coverage Status
Change from base Build 19511256283: -2.3%
Covered Lines: 1419
Relevant Lines: 2729

💛 - Coveralls

@joshka
Copy link

joshka commented Nov 24, 2025

Previously I did this in #234. Closed and instead we added the conversion to ratatui itself in ratatui/ratatui#1581. This may be good enough.

@orhun
Copy link
Author

orhun commented Nov 24, 2025

Yup, I think I will just use that.

Kinda embarrassing that I forgot about that anstyle module 🫣

@orhun orhun closed this Nov 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants