Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the tools package in favor of go 1.18 go install #2594

Closed
AlmogBaku opened this issue Apr 3, 2022 · 7 comments · Fixed by #2784
Closed

Remove the tools package in favor of go 1.18 go install #2594

AlmogBaku opened this issue Apr 3, 2022 · 7 comments · Fixed by #2784
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@AlmogBaku
Copy link
Member

What do you want to happen?

Objective

Compiling the dependent binaries using a special package tools can be replaced with go install as we are doing in the generated Makefile.

Solution:

  1. Remove the tools dir
  2. Replace the installation of APIDiff in the Makefile with GOBIN=$(shell dirname $(GO_APIDIFF)) go install github.com/joelanford/go-apidiff@latest

Extra Labels

No response

@AlmogBaku AlmogBaku added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 3, 2022
@AlmogBaku
Copy link
Member Author

/assign

@camilamacedo86
Copy link
Member

Hi @AlmogBaku,

Let's create an PR to do only this change
In its description, the Motivation can be add support to 1.18

@AlmogBaku
Copy link
Member Author

Since this issue depends on joelanford/go-apidiff#15 I suggest holding that

/hold

@camilamacedo86
Copy link
Member

camilamacedo86 commented Apr 4, 2022

Hi @AlmogBaku,

The apidiff on Kubebuilder is only used in the Ci - Github Action
We can still using go 1.17 for its ci if the appdiff does not work with https://github.com/kubernetes-sigs/kubebuilder/pull/2561/files#diff-dd565f122600dd57c8c3c546dd80893fe3e96c09f41ef16886f908d6d0ce7b50R21

Also, the new tools added to the project here: 9e94fe0 shows a mistake.

Why do we need to import API diff on the project at all?
It is not used by the CLI so that should not be imported in the go.mod at all.

In this way, it does not seems depends on:

Since this issue depends on joelanford/go-apidiff#15 I suggest holding that

We should change that and fix it by recomming the dep from KB go.mod ( cli ).
I can indeed add to its MOTIVATION: remove from Kubebuilder CLI unnecessary and unused deps.

@AlmogBaku
Copy link
Member Author

Right now, the make apidiff does work because it uses an updated version of golang.org/x/tools from our go module.

Until joelanford/go-apidiff#15 will be fixed, removing it will prevent developers from running make apidiff in local environments with go 1.18.

@joelanford
Copy link
Member

@AlmogBaku, I just released go-apidiff v0.4.0. Hopefully this solves the issue!

@mjlshen
Copy link
Contributor

mjlshen commented Jun 30, 2022

@AlmogBaku Wanted to check with you if it's ok if I work on this - it seems like all the pieces are in place and I'm happy to start on this if you're busy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
4 participants