mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #506] Install error - cannot convert b.borderAttributes #366
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#366
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @m-ivanov on GitHub (Sep 29, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/506
go get fails with following error
@rivo commented on GitHub (Sep 30, 2020):
I'm not sure how you get this. I just tried it myself:
Works fine here. It seems that you're using a different/newer version of
tcellas thetcell.Styletype has been changed recently. I haven't gotten around to updating this module yet.But as noted, it should work nonetheless because in
go.mod, thetcellversion is 1.3.0. And intcell1.3.0,Styleisint64.@m-ivanov commented on GitHub (Sep 30, 2020):
i got that error whithout using modules, with works just fine. So the issue can be closed. maybe add a line to readme. Thanks for fast feedback
@odddollar commented on GitHub (Oct 2, 2020):
I got the same error. How did people fix it?
@ledongthuc commented on GitHub (Oct 2, 2020):
@odddollar which Go version are you using? Maybe missing go modules in a package, it mismatch version dependencies
@odddollar commented on GitHub (Oct 3, 2020):
I'm using go1.15
@ledongthuc commented on GitHub (Oct 3, 2020):
@odddollar When you call
go get github.com/rivo/tview, do you have any module in folder you stay?If you call it from random folder without go.mod, it will got error because mismatch dependencies version
@odddollar commented on GitHub (Oct 3, 2020):
I open the cmd from the start menu and run the command in the default location of cmd. I've never had any issues installing libraries like this before.
@ledongthuc commented on GitHub (Oct 3, 2020):
@odddollar
It relates to dependencies linking.
The
github.com/rivo/tviewusesgithub.com/gdamore/tcellWhen you build with folder that has go module, it will link with locked version of
github.com/gdamore/tcell, thev1.3.0But when you build with random folder without go.mod, unfortunally, it get the latest version of
tcell, the 2.xx. It doesn't backward compatible with locked version v1.3.0 thatgithub.com/rivo/tvieware using.@afroewis commented on GitHub (Oct 4, 2020):
I am getting the same error when installing this library with a clean go installation (1.15).
@ledongthuc commented on GitHub (Oct 4, 2020):
@afroewis yes, please install it in folder that has go.mod currently.
@rivo commented on GitHub (Oct 15, 2020):
I can bump
tcellto the latest version but I'm not yet sure if I should. The latest version is v2.0.0-dev and the "dev" part looks to me like there may be more breaking changes coming up.Even if I upgraded to v2.0.0-dev now, it would break
tviewas well (but only in one function, from what I can see upon a quick glance, so maybe it's not that bad).But generally, as some of you maybe have seen here already, I don't want to break backwards compatibility. It would be unfortunate if
tcellforced me to. @gdamore, could you maybe weigh in? Do you plan on making more breaking changes like the one totcell.Style?@gdamore commented on GitHub (Oct 15, 2020):
I don’t plan anything else breaking. The one thing still left to do is bracketed paste support. Once that is done I will tag for release. I plan to do that shortly. That change should not be incompatible with what’s already there.
Get Outlookhttps://aka.ms/qtex0l for iOS
From: rivo notifications@github.com
Sent: Thursday, October 15, 2020 5:56:36 AM
To: rivo/tview tview@noreply.github.com
Cc: gdamore garrett@damore.org; Mention mention@noreply.github.com
Subject: Re: [rivo/tview] Install error - cannot convert b.borderAttributes (#506)
I can bump tcell to the latest version but I'm not yet sure if I should. The latest version is v2.0.0-devhttps://github.com/gdamore/tcell/releases/tag/v2.0.0-dev and the "dev" part looks to me like there may be more breaking changes coming up.
Even if I upgraded to v2.0.0-dev now, it would break tview as well (but only in one functionhttps://pkg.go.dev/github.com/rivo/tview#TableCell.SetStyle, from what I can see upon a quick glance, so maybe it's not that bad).
But generally, as some of you maybe have seen here already, I don't want to break backwards compatibility. It would be unfortunate if tview forced me to. @gdamorehttps://github.com/gdamore, could you maybe weigh in? Do you plan on making more breaking changes like the one to tcell.Style?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/rivo/tview/issues/506#issuecomment-709306064, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAJ4G7OIX33MY2JDJIURDOLSK3WQJANCNFSM4R6KM4AQ.
@rivo commented on GitHub (Oct 15, 2020):
Thanks, @gdamore ! I'll upgrade
tviewto the latest version then.@gdamore commented on GitHub (Oct 15, 2020):
Be advised that in formal v2, you may get some new events which aren't defined yet. Make sure that won't break your code. It shouldn't, and I don't consider it a breaking change, except that folks may have code that can't cope with receiving an event type that they didn't code to handle.
@gdamore commented on GitHub (Oct 15, 2020):
(I'm specifically planning for EventPasteStart, EventPasteEnd type of events.)
@rivo commented on GitHub (Oct 16, 2020):
New events should be fine.
Regarding
Style, I'm usingAttrMaskin a few places. Would it be possible to add aSetAttr(attr AttrMask)function to theStyletype? Otherwise, I may have to decomposeAttrMaskand call all of the functions such asStyle.Bold()myself.@gdamore commented on GitHub (Oct 16, 2020):
Sounds reasonable to me. Do you want to submit a PR?
@gdamore commented on GitHub (Oct 16, 2020):
Btw v2 is now released.
@rivo commented on GitHub (Oct 18, 2020):
Everybody, I've upgraded
tviewto the latesttcellversion. Due to the changes intcell, theTableCell.SetStyle()function has changed. I hope this doesn't break too many systems.I believe this should make
tviewwork without modules again.