tulir / gomuks

A terminal based Matrix client written in Go.
https://maunium.net/go/gomuks
GNU Affero General Public License v3.0
1.34k stars 120 forks source link

Update mautrix #458

Open symmmys opened 5 months ago

symmmys commented 5 months ago

Updated all the dependencies to their most recent versions, and then made the necessary changes for the client to run stably. Newly-introduced bugs may be expected at this moment.

n-peugnet commented 4 months ago

I don't get how you test this, it is not compiling at all on my end:

# maunium.net/go/gomuks/ui
ui/verification-modal.go:39:14: undefined: crypto.SASData
ui/verification-modal.go:70:17: undefined: crypto.DeviceIdentity
ui/verification-modal.go:88:62: undefined: crypto.DeviceIdentity
ui/verification-modal.go:149:61: undefined: crypto.VerificationMethod
ui/verification-modal.go:153:60: undefined: crypto.DeviceIdentity
ui/verification-modal.go:153:88: undefined: crypto.SASData
ui/crypto-commands.go:52:10: impossible type assertion: cmd.Matrix.Crypto().(*crypto.OlmMachine)
    *"maunium.net/go/mautrix/crypto".OlmMachine does not implement ifc.Crypto (wrong type for method DecryptMegolmEvent)
        have DecryptMegolmEvent(context.Context, *event.Event) (*event.Event, error)
        want DecryptMegolmEvent(*event.Event) (*event.Event, error)
ui/crypto-commands.go:101:38: undefined: crypto.DeviceIdentity
ui/crypto-commands.go:115:45: undefined: crypto.DeviceIdentity
ui/crypto-commands.go:177:51: undefined: crypto.DeviceIdentity
ui/crypto-commands.go:52:10: too many errors
# maunium.net/go/gomuks/matrix
matrix/crypto.go:64:29: undefined: crypto.NewGobStore
matrix/crypto.go:76:106: too many arguments in call to crypto.NewSQLCryptoStore
    have (*sql.DB, string, string, id.DeviceID, []byte, cryptoLogger)
    want (*dbutil.Database, dbutil.DatabaseLogger, string, id.DeviceID, []byte)
matrix/crypto.go:77:18: sqlStore.CreateTables undefined (type *"maunium.net/go/mautrix/crypto".SQLCryptoStore has no field or method CreateTables)
matrix/crypto.go:83:42: cannot use cryptoLogger{…} (value of type cryptoLogger) as *zerolog.Logger value in argument to crypto.NewOlmMachine
matrix/crypto.go:83:79: cannot use c.config.Rooms (variable of type *rooms.RoomCache) as "maunium.net/go/mautrix/crypto".StateStore value in argument to crypto.NewOlmMachine: *rooms.RoomCache does not implement "maunium.net/go/mautrix/crypto".StateStore (wrong type for method FindSharedRooms)
        have FindSharedRooms(id.UserID) ([]id.RoomID)
        want FindSharedRooms(context.Context, id.UserID) ([]id.RoomID, error)
matrix/crypto.go:84:8: crypt.AllowUnverifiedDevices undefined (type *"maunium.net/go/mautrix/crypto".OlmMachine has no field or method AllowUnverifiedDevices)
matrix/crypto.go:85:13: cannot use crypt (variable of type *"maunium.net/go/mautrix/crypto".OlmMachine) as ifc.Crypto value in assignment: *"maunium.net/go/mautrix/crypto".OlmMachine does not implement ifc.Crypto (wrong type for method DecryptMegolmEvent)
        have DecryptMegolmEvent(context.Context, *event.Event) (*event.Event, error)
        want DecryptMegolmEvent(*event.Event) (*event.Event, error)
matrix/crypto.go:94:18: impossible type assertion: c.crypto.(*crypto.OlmMachine)
    *"maunium.net/go/mautrix/crypto".OlmMachine does not implement ifc.Crypto (wrong type for method DecryptMegolmEvent)
        have DecryptMegolmEvent(context.Context, *event.Event) (*event.Event, error)
        want DecryptMegolmEvent(*event.Event) (*event.Event, error)

It seems you didn't update matrix/crypto.go, I had some things to change to make it compile with mautrix v0.14, same for ui/crypto-commands.go.