lightninglabs / lightning-terminal

Lightning Terminal: Your Home for Lightning Liquidity
MIT License
488 stars 82 forks source link

multi: update to go 1.21 #675

Closed jamaljsr closed 8 months ago

jamaljsr commented 8 months ago

I needed to update to go v1.21 to build tapd. Now when building litd, it results in the error:

 Installing lightning-terminal.
go install -v -trimpath -tags="litd autopilotrpc signrpc walletrpc chainrpc invoicesrpc watchtowerrpc neutrinorpc peersrpc" -ldflags " -X github.com/lightningnetwork/lnd/build.Commit=lightning-terminal-v0.12.0-alpha-6-gd782cbbfef73145c992e034e3641cef9bcc0f135 -X github.com/lightningnetwork/lnd/build.CommitHash=d782cbbfef73145c992e034e3641cef9bcc0f135 -X github.com/lightningnetwork/lnd/build.GoVersion= -X github.com/lightningnetwork/lnd/build.RawTags=litd,autopilotrpc,signrpc,walletrpc,chainrpc,invoicesrpc,watchtowerrpc,neutrinorpc,peersrpc -X github.com/lightninglabs/lightning-terminal.appFilesPrefix= -X github.com/lightninglabs/lightning-terminal.Commit=v0.12.0-alpha-6-gd782cbbfef73145c992e034e3641cef9bcc0f135 -X github.com/lightninglabs/loop.Commit=v0.26.4-beta -X github.com/lightninglabs/pool.Commit=v0.6.4-beta.0.20231003174306-80d8854a0c4b -X github.com/lightninglabs/taproot-assets.Commit=v0.3.0" github.com/lightninglabs/lightning-terminal/cmd/litd
go: updates to go.mod needed; to update it:
    go mod tidy
make: *** [Makefile:131: go-install] Error 1

When running go mod tidy, it produced the diff here in this PR. I also updated the Docker and GH workflow files to use go v1.21 as well.

I have tested this branch while using go v1.19 and it still works, so this is a backward compatible change.

jamaljsr commented 8 months ago

just came to my mind whether we want to wait until all subdaemons have been upgraded to 1.21, to let their unit/integration tests pass

I didn't mention this initially but the immediate need for this fix is because the cron job that updates the API Docs site daily has been failing for over a week now due to this issue. Unless there's a compatibility issue with the other sub-daemons, it would be better to not wait.

bitromortac commented 8 months ago

Just looked at the lnd unit/itests, they run with go 1.21, so I think it should be fine

jamaljsr commented 8 months ago

Rebased. Merging now.