whyrusleeping / gx-go

gx subtool for golang
MIT License
80 stars 28 forks source link

devcopy: check if symlink exists before making it #30

Open paralin opened 6 years ago

paralin commented 6 years ago

This will prevent errors about the directory already existing in the vendor tree.

ERROR: Error: symlink /goworkspace/src/github.com/ipfs/go-ipfs/vendor/gx/ipfs/QmXPKMT5cT8ajqamSD1YaeEpfeaHvs9AU4MQzte4Bkr6V4/sys /goworkspace/src/github.com/ipfs/go-ipfs/vendor/golang.org/x/sys: file exists
arunthampi commented 6 years ago

ran into this just now, can we please merge this?

rob-deutsch commented 5 years ago

+1, I'm also running into this now

Out of curiosity, why is it happening? Why does the symlink already exist?

schomatis commented 5 years ago

Out of curiosity, why is it happening? Why does the symlink already exist?

What's the use case for this command? Could you provide an example?

rob-deutsch commented 5 years ago

What's the use case for this command? Could you provide an example?

I don't actually know what the use case is.

I thought I had a valid use-case for it, but upon further investigation it doesn't work for my use case.

I was using it to try and package my local source 'tree' for a Docker deploy. At a naive level it works for this task, but I was wanting it to incorporate all my gx-go linked dependancies, which I don't think it does.

schomatis commented 5 years ago

but I was wanting it to incorporate all my gx-go linked dependancies, which I don't think it does.

Ok, yes my question was aimed at that connection with gx-go link, like why do you use this command instead of gx-go link or how do they interact.

rob-deutsch commented 5 years ago

@whyrusleeping is probably the best person to answer this as he committed 002072b56a1f1f6788d4918bd0a3f3edd205ff58

This explanation is possibly incorrect, given that I haven't fully run gx-go devcopy through its paces.

My understanding is: