From 5b39d25411f65f6ca66c31f2e43feacd6eda2176 Mon Sep 17 00:00:00 2001 From: Pranav Gaikwad Date: Fri, 13 Dec 2024 10:00:27 -0500 Subject: [PATCH] :ghost: update go version as gopls needs it Signed-off-by: Pranav Gaikwad --- external-providers/generic-external-provider/Dockerfile | 7 ++++--- provider_container_settings.json | 2 +- provider_pod_local_settings.json | 2 +- provider_settings.json.sample | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/external-providers/generic-external-provider/Dockerfile b/external-providers/generic-external-provider/Dockerfile index bf1e3a7f..66308c5b 100644 --- a/external-providers/generic-external-provider/Dockerfile +++ b/external-providers/generic-external-provider/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 as go-builder +FROM golang:1.23 as go-builder COPY / /analyzer-lsp @@ -12,7 +12,7 @@ COPY external-providers/generic-external-provider/pkg/ pkg/ RUN go mod edit -replace=github.com/konveyor/analyzer-lsp=/analyzer-lsp && go mod tidy -RUN go build -o generic-external-provider main.go +RUN go build -o generic-external-provider main.go && go install golang.org/x/tools/gopls@latest FROM quay.io/konveyor/golang-dependency-provider as go-dep-provider @@ -26,8 +26,9 @@ RUN microdnf install gcc-c++ python-devel go-toolset python3-devel nodejs -y && RUN python3 -m ensurepip --upgrade RUN python3 -m pip install 'python-lsp-server>=1.8.2' RUN npm install -g typescript-language-server typescript -RUN go install golang.org/x/tools/gopls@latest + +COPY --from=go-builder /go/bin/gopls /usr/local/bin/gopls COPY --from=go-builder /generic-external-provider/generic-external-provider /usr/local/bin/generic-external-provider COPY --from=go-dep-provider /usr/local/bin/golang-dependency-provider /usr/local/bin/golang-dependency-provider diff --git a/provider_container_settings.json b/provider_container_settings.json index f68b7bd9..be04563f 100644 --- a/provider_container_settings.json +++ b/provider_container_settings.json @@ -6,7 +6,7 @@ "analysisMode": "full", "providerSpecificConfig": { "lspServerName": "generic", - "lspServerPath": "/root/go/bin/gopls", + "lspServerPath": "/usr/local/bin/gopls", "lspServerArgs": [], "lspServerInitializationOptions": "", diff --git a/provider_pod_local_settings.json b/provider_pod_local_settings.json index c1251307..6542c68d 100644 --- a/provider_pod_local_settings.json +++ b/provider_pod_local_settings.json @@ -6,7 +6,7 @@ "analysisMode": "full", "providerSpecificConfig": { "lspServerName": "generic", - "lspServerPath": "/root/go/bin/gopls", + "lspServerPath": "/usr/local/bin/gopls", "lspServerArgs": [], "lspServerInitializationOptions": "", diff --git a/provider_settings.json.sample b/provider_settings.json.sample index 356e5ae5..198f1cfa 100644 --- a/provider_settings.json.sample +++ b/provider_settings.json.sample @@ -5,7 +5,7 @@ "initConfig": [{ "location": "/analyzer-lsp/examples/golang", "providerSpecificConfig": { - "lspServerPath": "/root/go/bin/gopls" + "lspServerPath": "/usr/local/bin/gopls" } }] },