Re: [go-nuts] Re: go install of forked repo

2023-05-03 Thread ged...@gmail.com
the original question was to do it from anywhere. that's also what i would like to do.. go install from anywhere... Not when you in a project with a go.work or go.mod etc etc It's a pain that this is not supported. On Monday, 5 December 2022 at 1:09:13 pm UTC+1 Robert Engels wrote: > As I

Re: [go-nuts] Re: go install of forked repo

2022-12-05 Thread Robert Engels
As I mentioned in the other thread - isn’t that made more complicated because the module author (the module that is imported) doesnt use relative packages references? If they did wouldn’t this be simpler? > On Dec 5, 2022, at 5:32 AM, Brian Candler wrote: > > Or there is vendoring. > >> On

Re: [go-nuts] Re: go install of forked repo

2022-12-05 Thread Brian Candler
Or there is vendoring . On Monday, 5 December 2022 at 09:16:24 UTC stephane@gmail.com wrote: > Hi, > > If you don't want to commit *go.mod*, you can use *go.work > *https://go.dev/ref/mod#go-work-file > > On Monday, December 5, 2022 at

Re: [go-nuts] Re: go install of forked repo

2022-12-05 Thread Stéphane Jeandeaux
Hi, If you don't want to commit *go.mod*, you can use *go.work * https://go.dev/ref/mod#go-work-file On Monday, December 5, 2022 at 9:52:17 AM UTC+1 kortschak wrote: > On Sun, 2022-12-04 at 23:47 -0800, 'Christian Stewart' via golang-nuts > wrote: > > I definitely fork things and use "replace"

Re: [go-nuts] Re: go install of forked repo

2022-12-05 Thread 'Dan Kortschak' via golang-nuts
On Sun, 2022-12-04 at 23:47 -0800, 'Christian Stewart' via golang-nuts wrote: > I definitely fork things and use "replace" quite frequently. It *can* be used, but it is not the solution in the general case as Volker said. A replace in a library's go.mod file has no effect on consumers of that

Re: [go-nuts] Re: go install of forked repo

2022-12-04 Thread 'Christian Stewart' via golang-nuts
I definitely fork things and use "replace" quite frequently. When forking something you have to tell Go where to find it, that's what "replace" is for. There's a issue about using replaces in `go install` without a go.mod: https://github.com/golang/go/issues/44840 On Sun, Dec 4, 2022 at 11:40

Re: [go-nuts] Re: go install of forked repo

2022-12-04 Thread Volker Dobler
On Sunday, 4 December 2022 at 15:13:46 UTC+1 ren...@ix.netcom.com wrote: > Can’t you use a replace directive to use the fork ? > No, not in the general case. V. > > On Dec 4, 2022, at 6:17 AM, Volker Dobler wrote: > > You cannot use a "fork". The Github concept of a "fork" doesn't > > work

Re: [go-nuts] Re: go install of forked repo

2022-12-04 Thread Robert Engels
Can’t you use a replace directive to use the fork ? > On Dec 4, 2022, at 6:17 AM, Volker Dobler wrote: > > You cannot use a "fork". The Github concept of a "fork" doesn't > work together with the concept of a Go module. > You are free to fork a repo and you can modify the source > after git

[go-nuts] Re: go install of forked repo

2022-12-04 Thread Volker Dobler
You cannot use a "fork". The Github concept of a "fork" doesn't work together with the concept of a Go module. You are free to fork a repo and you can modify the source after git cloning your "fork" you even can build the "fork" and go install it's binaries by simply running go install inside of