Dominator icon indicating copy to clipboard operation
Dominator copied to clipboard

Go mod support

Open michaeljs1990 opened this issue 5 years ago • 4 comments

Add go.mod so we can take advantage of it's dependency management and also not require that the code is cloned into your GOPATH anymore. The biggest difference that this brings is that if you want to develop against a local checkout of something like tricorder you would need to add in the following line to go.mod during development.

replace github.com/Cloud-Foundations/tricorder => ../path/to/tricoder

In order for dependencies to resolve properly with mod we had to switch to use github.com/howeyc/fsnotify from gopkg.in/fsnotify/fsnotify.v0. The fsnotify project has moved away from using gopkg.in as seen in https://github.com/fsnotify/fsnotify/issues/108. Additionally github.com/howeyc/fsnotify is no longer under active development but contains the same code as the gopkg.in v0 version.

I'm not sure how the makefile build commands were working before. They seem like they do something but I don't see it actually building anything. The commands I switched it out with I can see bins being produced for now.

For whatever reason closing the connections in reverseconnection causes a hang. I'm still trying to figure out why but am at a bit of a loss.

michaeljs1990 avatar Jan 31 '20 02:01 michaeljs1990

It seems to be hanging on the test in lib/net/reverseconnection

michaeljs1990 avatar Jan 31 '20 03:01 michaeljs1990

Not today. Looks like the reverseconnection breaking with go over version 1.10 is known and go mod isn't available until 1.11.

michaeljs1990 avatar Jan 31 '20 03:01 michaeljs1990

I have two main concerns:

  1. this seems to require manually maintaining lists of dependencies and worse, versions/checksums
  2. a test was disabled.

rgooch avatar Feb 09 '20 07:02 rgooch

I have two main concerns:

  1. this seems to require manually maintaining lists of dependencies and worse, versions/checksums

Is the concern that a human would have to edit this or the existence of the go.sum/go.mod at all? Updating the file can be done with the go toolset and should really be something that you never need to look at. Running go get -u will cause both files to be updated with whatever latest versions are needed.

  1. a test was disabled.

If we are fine with the general direction of this I'll dig into why closing the connection is causing a hang.

michaeljs1990 avatar Feb 09 '20 08:02 michaeljs1990

This seems to have been obsoleted quite a while ago.

rgooch avatar Apr 29 '24 02:04 rgooch