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

 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 committed Feb 10, 2023
1 parent ccbffba commit 68382cc
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 68382cc

Please sign in to comment.