This is an archive of the discontinued LLVM Phabricator instance.

[bindings/go] add go.mod file
Needs ReviewPublic

Authored by chai2010 on Oct 19 2021, 5:31 AM.

Details

Reviewers
echristo
aykevl
Summary

go mod replace only works if target has go.mod:
https://github.com/golang/go/issues/30847

Diff Detail

Event Timeline

chai2010 requested review of this revision.Oct 19 2021, 5:31 AM
chai2010 created this revision.
lkail added a subscriber: lkail.Oct 19 2021, 5:38 AM
aykevl added a comment.Jan 4 2022, 3:46 PM

This doesn't look like a correct Go module name:

$ go get llvm.org/llvm/bindings/go/llvm
go get: unrecognized import path "llvm.org/llvm/bindings/go/llvm": GOVCS disallows using svn for public llvm.org/llvm; see 'go help vcs'

I see two options:

  1. Add the go-import meta tag, see https://gianarb.it/blog/go-mod-vanity-url for example.
  2. Use github.com/llvm/llvm-project/llvm/bindings/go/llvm instead.

The first one might be the cleaner option, while the second one will likely be easier to implement.

aykevl resigned from this revision.Nov 14 2022, 3:44 PM

This is not relevant anymore since the Go bindings are removed. See D135436.

Herald added a project: Restricted Project. · View Herald TranscriptNov 14 2022, 3:44 PM