Build error after upgrade to latest from master. out.LineBounds.LineThickness undefined
dliu2223 opened this issue · comments
Checklist
- I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
- This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
I did a git pull to update to latest from last November version, the build failed with following errors:
../../../../../../fyne.io/fyne/v2/internal/painter/font.go:209:65: out.LineBounds.LineThickness undefined (type shaping.Bounds has no field or method LineThickness)
I did not save the old version, need help to resolve this issue ASAP.
How to reproduce
go build main.go
fyne.io/fyne/v2/internal/painter
../../../../../../fyne.io/fyne/v2/internal/painter/font.go:209:65: out.LineBounds.LineThickness undefined (type shaping.Bounds has no field or method LineThickness)
Screenshots
No response
Example code
go build main.go
fyne.io/fyne/v2/internal/painter
../../../../../../fyne.io/fyne/v2/internal/painter/font.go:209:65: out.LineBounds.LineThickness undefined (type shaping.Bounds has no field or method LineThickness)
Fyne version
commit e332a5e (HEAD -> master, tag: v2.4.4, origin/master, origin/HEAD) Merge: 0ace386 9073c1b Author: Andy Williams andy@andy.xyz Date: Tue Feb 13 09:07:10 2024 +0000 Merge branch 'release/v2.4.x'
Go compiler version
go version go1.21.1 darwin/amd64
Operating system and version
mac sonoma 14.4
Additional Information
No response
I reverted back to version 2.4.2 and the build worked. Thanks
2.4.3 also worked; but 2.4.4.rc1 failed
You have upgraded your go-text dependency to a newer one than the Fyne project lists as the version. They made a breaking change which is the error that you see.
However this was resolved with Fyne v2.4.4, so do try that version. (See changelog "Fix possible compile error from go-text/typesetting").
It is possible that you have the opposite problem - have you vendored, or enforced a version of go-text/typesetting that is older than the ragged version numbers?
No vendored or enforced go-text version, the GO111MODULE=off for this build due to other internal dependencies.
I tried the fyne-2.4.4.tar.gz, problem still there. Please let me know what else to try, thanks
I updated my local version github.com/go-text with latest, now the version is in sync, compile error is fixed. Thanks
Turning off module support is unsupported with Go 1.22 and later. I would advise you to update to use modules instead. That is what we recommend.