-
Notifications
You must be signed in to change notification settings - Fork 63
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
trying to use tui-textarea in another project - version conflict #55
Comments
Please paste entire error message. I see no conflict. And |
How about we bump gitui to 0.24 instead? I'll slap a PR for it together. |
@joshka - it doubt it will be accepted soon. I have worked with gitui for 3 years, owner has very aggressive cargo check deny policy of duplicated crates etc. There is another issue blocking a ton of stuff for months extrawurst/gitui#1781 (I have a PR that been sitting there for 5 months). This is a classic example of whats wrong with cargo version management, its almost perfect, but not quite, and its hard to override (patch does not help here) |
here you see the clash because my file textinput.rs receives Style arguments from gitui and passes the to tta
|
I know that the bitflags change is problematic - it will change the serialization format, which will mean that configuration breaks for every user. |
Extrawurst already has that fixed in a branch. I raised it when I first was trying to get tta into gitui. This is a long saga . See extrawurst/gitui#1929 |
Isn't it your local problem with old |
I confirmed ratatui 0.23 worked with tui-textarea fine. > cargo tree --edges no-dev
tui-textarea v0.4.0
├── crossterm v0.27.0
│ ├── bitflags v2.4.1
│ ├── crossterm_winapi v0.9.1
│ │ └── winapi v0.3.9
│ ├── parking_lot v0.12.1
│ │ ├── lock_api v0.4.11
│ │ │ └── scopeguard v1.2.0
│ │ │ [build-dependencies]
│ │ │ └── autocfg v1.1.0
│ │ └── parking_lot_core v0.9.9
│ │ ├── cfg-if v1.0.0
│ │ ├── smallvec v1.11.2
│ │ └── windows-targets v0.48.5
│ │ └── windows_x86_64_msvc v0.48.5
│ └── winapi v0.3.9
├── ratatui v0.23.0
│ ├── bitflags v2.4.1
│ ├── cassowary v0.3.0
│ ├── crossterm v0.27.0 (*)
│ ├── indoc v2.0.4 (proc-macro)
│ ├── itertools v0.11.0
│ │ └── either v1.9.0
│ ├── paste v1.0.14 (proc-macro)
│ ├── strum v0.25.0
│ │ └── strum_macros v0.25.3 (proc-macro)
│ │ ├── heck v0.4.1
│ │ ├── proc-macro2 v1.0.69
│ │ │ └── unicode-ident v1.0.12
│ │ ├── quote v1.0.33
│ │ │ └── proc-macro2 v1.0.69 (*)
│ │ ├── rustversion v1.0.14 (proc-macro)
│ │ └── syn v2.0.39
│ │ ├── proc-macro2 v1.0.69 (*)
│ │ ├── quote v1.0.33 (*)
│ │ └── unicode-ident v1.0.12
│ ├── unicode-segmentation v1.10.1
│ └── unicode-width v0.1.11
└── unicode-width v0.1.11 |
I created a dummy project to confirm this is not a problem of tui-textarea. The configuration was: [dependencies]
ratatui = { version = "0.23", default-features = false, features = ['crossterm', 'serde'] }
tui-textarea = "0.4.0" and I checked the dependencies tree. ratatui v0.23.0 was correctly shared between the dummy project and tui-textarea: > cargo tree
test_project v0.1.0
├── ratatui v0.23.0
│ ├── bitflags v2.4.1
│ │ └── serde v1.0.193
│ │ └── serde_derive v1.0.193 (proc-macro)
│ │ │ └── unicode-ident v1.0.12
│ │ ├── quote v1.0.33
│ │ │ └── proc-macro2 v1.0.69 (*)
│ │ └── syn v2.0.39
│ │ ├── proc-macro2 v1.0.69 (*)
│ │ ├── quote v1.0.33 (*)
│ │ └── unicode-ident v1.0.12
│ ├── cassowary v0.3.0
│ ├── crossterm v0.27.0
│ │ ├── bitflags v2.4.1 (*)
│ │ ├── crossterm_winapi v0.9.1
│ │ │ └── winapi v0.3.9
│ │ ├── parking_lot v0.12.1
│ │ │ ├── lock_api v0.4.11
│ │ │ │ └── scopeguard v1.2.0
│ │ │ │ [build-dependencies]
│ │ │ │ └── autocfg v1.1.0
│ │ │ └── parking_lot_core v0.9.9
│ │ │ ├── cfg-if v1.0.0
│ │ │ ├── smallvec v1.11.2
│ │ │ └── windows-targets v0.48.5
│ │ │ └── windows_x86_64_msvc v0.48.5
│ │ └── winapi v0.3.9
│ ├── indoc v2.0.4 (proc-macro)
│ ├── itertools v0.11.0
│ │ └── either v1.9.0
│ ├── paste v1.0.14 (proc-macro)
│ ├── serde v1.0.193 (*)
│ ├── strum v0.25.0
│ │ └── strum_macros v0.25.3 (proc-macro)
│ │ ├── heck v0.4.1
│ │ ├── proc-macro2 v1.0.69 (*)
│ │ ├── quote v1.0.33 (*)
│ │ ├── rustversion v1.0.14 (proc-macro)
│ │ └── syn v2.0.39 (*)
│ ├── unicode-segmentation v1.10.1
│ └── unicode-width v0.1.11
└── tui-textarea v0.4.0
├── crossterm v0.27.0 (*)
├── ratatui v0.23.0 (*)
└── unicode-width v0.1.11 |
@rhysd - ty for looking at this. I was not very clear. I know how to make this work by hand editing the cargo.lock file, works perfectly, and is not a problem with tui-textarea. But I doubt owner will accept that. You have experience with complex version juggling (tui, ratatui, crossterm....) and wondered if you had any tricks that I could use. Seems not |
FWIW I created the same project just now [package]
name = "foo2"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
ratatui = { version = "0.23", default-features = false, features = ['crossterm', 'serde'] }
tui-textarea = "0.4.0" And the tree looks like this:
I can make it behave in two different ways. Adding tta into a project with already existing ratatui makes it so tta uses it - I'm assuming you used |
Hi, This issue, combined with cargo's rust-lang/cargo#9029 is forcing us to commit It looks like the fix/change on cargo side will take a long time at best. Is there any chance you'd reconsider expressing your dependency in a more classical way ? Thanks |
I am trying to make gitui use tui-textarea (its why I came here in the first place)
My problem is that I need to use the same version of ratatui in gitui and tta. This because arguments from ratatui (Style) are passed between the gitui code and the code I have written using tta.
gitui says
ratatui = { version = "0.23", default-features = false, features = ['crossterm', 'serde'] }
(It used to say 0.21 but I changed it in my PR to I am putting together). I cannot change gitui to 0.24 because there are breaking changes between 0.23 and 0.24. I need both to use 0.23
tta says
ratatui = { version = ">=0.23.0 , <1", default-features = false, optional = true }
If I build that I end up with gitui using 0.23 and tta using 0.24, does not compile
You would think that cargo would work this out ,but it doesnt.
The only way I have found to make that work is by changing ttas cargo.toml to specifically say
ratatui = { version = "0.23.0", default-features = false, optional = true }
this then works, but seems like a backwards step (that I would have to persuade you to make, which seems wrong anyway)
Any advice ?
The text was updated successfully, but these errors were encountered: