Skip to content

Commit

Permalink
Remove netgo build tag for Windows to disable new Go resolver behav…
Browse files Browse the repository at this point in the history
…iour (#352)

In go1.19 there is no support for 'hosts' file for Windows:
 golang/go#57757

 Disabling netgo will revert behaviour to go1.18 for resolving names
  • Loading branch information
nikita-vanyasin authored Feb 14, 2023
1 parent ccbffba commit d8182d4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Improve deprecated notice for old passthrough flags
- Improve detection of arangod binary when running local installation (use --server.use-local-bin)
- Upgrade base Alpine image and Go dependencies to fix CVEs
- Remove `netgo` build tag for Windows to disable new Go resolver behaviour: https://github.com/golang/go/issues/57757

## [0.15.6](https://github.com/arangodb-helper/arangodb/tree/0.15.6) (2023-01-20)
- Fix restarting cluster with arangosync enabled
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ binaries-test:

$(BIN): $(GOBUILDDIR) $(GO_SOURCES)
@mkdir -p $(BINDIR)
ifeq ($(GOOS),windows)
$(DOCKER_CMD) go build -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o "$(BUILD_BIN)" .
else
$(DOCKER_CMD) go build -installsuffix netgo -tags netgo -ldflags "-X main.projectVersion=$(VERSION) -X main.projectBuild=$(COMMIT)" -o "$(BUILD_BIN)" .
endif

$(TESTBIN): $(GOBUILDDIR) $(TEST_SOURCES) $(BIN)
@mkdir -p $(BINDIR)
Expand Down

0 comments on commit d8182d4

Please sign in to comment.