Skip to content
This repository has been archived by the owner on May 9, 2023. It is now read-only.

Check that go get github.com/triggermesh/tm works #190

Closed
tzununbekov opened this issue May 21, 2020 · 4 comments
Closed

Check that go get github.com/triggermesh/tm works #190

tzununbekov opened this issue May 21, 2020 · 4 comments
Assignees
Labels
p0 Highest priority

Comments

@tzununbekov
Copy link
Member

user reported that he had a build errors when run go get github.com/triggermesh/tm command:

# github.com/knative/pkg/kmeta
go/pkg/mod/github.com/knative/pkg@v0.0.0-20190624141606-d82505e6c5b4/kmeta/accessor.go:66:21: undefined: v1.Initializers
go/pkg/mod/github.com/knative/pkg@v0.0.0-20190624141606-d82505e6c5b4/kmeta/accessor.go:67:32: undefined: v1.Initializers
# github.com/tektoncd/triggers/pkg/client/clientset/versioned/typed/triggers/v1alpha1
go/pkg/mod/github.com/tektoncd/triggers@v0.1.0/pkg/client/clientset/versioned/typed/triggers/v1alpha1/triggers_client.go:84:32: undefined: serializer.DirectCodecFactory
# knative.dev/eventing/pkg/apis/duck/v1alpha1
go/pkg/mod/knative.dev/eventing@v0.12.0/pkg/apis/duck/v1alpha1/channelable_types.go:98:4: cannot use &"k8s.io/api/core/v1".ObjectReference literal (type *"k8s.io/api/core/v1".ObjectReference) as type *"knative.dev/pkg/apis/duck/v1".KReference in field value
@eddiewang
Copy link

can confirm that I got the same error. ended up using the release build.

@tzununbekov tzununbekov self-assigned this Jun 24, 2020
@tzununbekov tzununbekov added the p0 Highest priority label Jun 24, 2020
@hechth
Copy link

hechth commented Jun 30, 2020

Encountered the same problem, so seems to be still existing.

@tzununbekov
Copy link
Member Author

thanks for confirming. This issue is caused by mixing different versions of the same packages to support backward compatibility with old build approaches. We're working on getting rid of these dependencies but it takes a bit more than we expected so for now there are two alternatives to go get:

  • get binaries from the latest release - we're keeping it in sync with the upstream
  • git clone, go install - if you want to have your version of tm CLI installed

@tzununbekov
Copy link
Member Author

tzununbekov commented Jul 15, 2020

Outdated dependencies and mixed versions are not the reason for a failing go get - in this PR we got rid of old components and it didn't help.
What actually caused the described issue is go get behavior:

replace directives have no effect outside of your own module, so if you invoke go get outside of your own module, they have no effect.

golang/go#30354

In other words, it means that dependency replacements that we have in go.mod are not honored if you run go get github.com/triggermesh/tm outside the module root path. We've updated the readme to avoid this issue:

There are two ways of tm CLI installation:

git clone https://github.com/triggermesh/tm.git
cd tm
go install

Feel free to re-open the issue if you have any additional inputs or possible solutions are not clear for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p0 Highest priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants