Build fails under go1.16

This issue has been created since 2021-02-05.

go version

go version go1.16rc1 linux/amd64

From go1.16 changelog:

Build commands like go build and go test no longer modify go.mod and go.sum by default. Instead, they report an error if a module requirement or checksum needs to be added or updated (as if the -mod=readonly flag were used). Module requirements and sums may be adjusted with go mod tidy or go get.

xcaddy build

2021/02/05 10:29:01 [INFO] Temporary folder: /tmp/buildenv_2021-02-05-1029.946899145
2021/02/05 10:29:01 [INFO] Writing main module: /tmp/buildenv_2021-02-05-1029.946899145/main.go
2021/02/05 10:29:01 [INFO] Initializing Go module
2021/02/05 10:29:01 [INFO] exec (timeout=10s): /usr/bin/go mod init caddy 
go: creating new go.mod: module caddy
go: to add module requirements and sums:
	go mod tidy
2021/02/05 10:29:01 [INFO] Pinning versions
2021/02/05 10:29:01 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2 
go get: added github.com/caddyserver/caddy/v2 v2.3.0
2021/02/05 10:29:02 [INFO] Build environment ready
2021/02/05 10:29:02 [INFO] Building Caddy
2021/02/05 10:29:02 [INFO] exec (timeout=0s): /usr/bin/go build -o /home/dionysius/Документы/Исходники/go/gitlab.com/activecdn/caddy -ldflags -w -s -trimpath 
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:30:2: missing go.sum entry for module providing package github.com/Masterminds/sprig/v3 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:31:2: missing go.sum entry for module providing package github.com/alecthomas/chroma/formatters/html (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/caddyconfig/httpcaddyfile/serveroptions.go:25:2: missing go.sum entry for module providing package github.com/dustin/go-humanize (imported by github.com/caddyserver/caddy/v2/modules/logging); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/acmeserver/acmeserver.go:29:2: missing go.sum entry for module providing package github.com/go-chi/chi (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddypki/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:29:2: missing go.sum entry for module providing package github.com/google/cel-go/cel (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:30:2: missing go.sum entry for module providing package github.com/google/cel-go/checker/decls (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:31:2: missing go.sum entry for module providing package github.com/google/cel-go/common/types (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:32:2: missing go.sum entry for module providing package github.com/google/cel-go/common/types/ref (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:33:2: missing go.sum entry for module providing package github.com/google/cel-go/common/types/traits (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:34:2: missing go.sum entry for module providing package github.com/google/cel-go/ext (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:35:2: missing go.sum entry for module providing package github.com/google/cel-go/interpreter/functions (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/logging/encoders.go:25:2: missing go.sum entry for module providing package github.com/jsternberg/zap-logfmt (imported by github.com/caddyserver/caddy/v2/modules/logging); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/encode/gzip/gzip.go:25:2: missing go.sum entry for module providing package github.com/klauspost/compress/gzip (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/gzip); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/encode/zstd/zstd.go:21:2: missing go.sum entry for module providing package github.com/klauspost/compress/zstd (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/zstd); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/encode/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddytls/values.go:23:2: missing go.sum entry for module providing package github.com/klauspost/cpuid/v2 (imported by github.com/caddyserver/caddy/v2/modules/caddytls); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/app.go:28:2: missing go.sum entry for module providing package github.com/lucas-clemente/quic-go/http3 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/frontmatter.go:9:2: missing go.sum entry for module providing package github.com/naoina/toml (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/acmeserver/acmeserver.go:30:2: missing go.sum entry for module providing package github.com/smallstep/certificates/acme (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddypki/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/acmeserver/acmeserver.go:31:2: missing go.sum entry for module providing package github.com/smallstep/certificates/acme/api (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddypki/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/ca.go:28:2: missing go.sum entry for module providing package github.com/smallstep/certificates/authority (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddytls/internalissuer.go:29:2: missing go.sum entry for module providing package github.com/smallstep/certificates/authority/provisioner (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddypki/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/ca.go:29:2: missing go.sum entry for module providing package github.com/smallstep/certificates/db (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/certificates.go:21:2: missing go.sum entry for module providing package github.com/smallstep/cli/crypto/x509util (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/acmeserver/acmeserver.go:35:2: missing go.sum entry for module providing package github.com/smallstep/nosql (imported by github.com/caddyserver/caddy/v2/modules/caddypki/acmeserver); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddypki/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddypki/ca.go:30:2: missing go.sum entry for module providing package github.com/smallstep/truststore (imported by github.com/caddyserver/caddy/v2/modules/caddypki); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:34:2: missing go.sum entry for module providing package github.com/yuin/goldmark (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:35:2: missing go.sum entry for module providing package github.com/yuin/goldmark-highlighting (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:36:2: missing go.sum entry for module providing package github.com/yuin/goldmark/extension (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:37:2: missing go.sum entry for module providing package github.com/yuin/goldmark/parser (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/tplcontext.go:38:2: missing go.sum entry for module providing package github.com/yuin/goldmark/renderer/html (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/celmatcher.go:36:2: missing go.sum entry for module providing package google.golang.org/genproto/googleapis/api/expr/v1alpha1 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/logging/filewriter.go:28:2: missing go.sum entry for module providing package gopkg.in/natefinch/lumberjack.v2 (imported by github.com/caddyserver/caddy/v2/modules/logging); to add:
	go get github.com/caddyserver/caddy/v2/modules/[email protected]
/home/dionysius/go/pkg/mod/github.com/caddyserver/caddy/[email protected]/modules/caddyhttp/templates/frontmatter.go:10:2: missing go.sum entry for module providing package gopkg.in/yaml.v2 (imported by github.com/caddyserver/caddy/v2/modules/caddyhttp/templates); to add:
	go get github.com/caddyserver/caddy/v2/modules/caddyhttp/[email protected]
2021/02/05 10:29:02 [INFO] Cleaning up temporary folder: /tmp/buildenv_2021-02-05-1029.946899145
2021/02/05 10:29:02 [FATAL] exit status 1
mohammed90 wrote this answer on 2021-02-05

I was able to reproduce it in clean env. Shooting the PR in a few.

More Details About Repo
Owner Name caddyserver
Repo Name xcaddy
Full Name caddyserver/xcaddy
Language Go
Created Date 2020-03-21
Updated Date 2022-09-22
Star Count 381
Watcher Count 14
Fork Count 72
Issue Count 3

YOU MAY BE INTERESTED

Issue Title Created Date Comment Count Updated Date
Add data for German "Bundestag" elections in 2021 0 2021-12-21 2022-08-20
Add JOSS Badge to README 1 2020-01-28 2022-08-08
Memory leak when reading LAS 1 2022-01-15 2022-05-17
Write las ascii object to memory as JSON 2 2021-12-15 2022-07-21
Add support for advanced color mode 1 2020-01-04 2022-08-19
Improve logging management 0 2022-02-09 2022-08-03
24 Classics failed with '404 Not Found' and Error Processing FolderList 4 2022-03-28 2022-04-24
can not load Wu2020Adversarial on cifar100 3 2021-05-04 2022-09-11
dropout rate of the Standard network 2 2021-05-01 2022-05-09
[Term Entry] Java Math Methods: `.pow()` 0 2022-08-23 2022-08-23
Feature request: optionally pass request to before_record_response 2 2020-08-24 2022-09-03
Server-side pagination plug-in. 2 2021-12-16 2022-01-31
Select a row and change the color of the selected rows. 3 2021-12-14 2022-06-25
Bad state: No element 3 2021-12-15 2022-07-23
Wrong nested dependencies removal 0 2022-08-28 2022-09-17
Delete aop-logging module 0 2022-08-29 2022-09-01
Apply new and apply all on landscape 1 2022-08-29 2022-09-01
K8SSAND-1668 ⁃ Investigate flaky CDC tests 5 2022-07-18 2022-07-18
Is there is a way to invert rule via configuration? 6 2021-01-14 2022-03-14
Detect the use of FQN with CodeNarc? 2 2021-02-10 2022-09-21
openvino推理出现警告 0 2021-11-05 2021-12-26
show differences between two json 1 2022-02-10 2022-09-02
bug: Chapter 12 - terminal terminology 0 2021-02-27 2022-09-03
reflectx.getMapping compatibility from 1.2 to 1.3 when joining multiple models with same field name. 0 2021-07-20 2022-09-16
potential bug report on visitChildren() in c++ in ANTLR 4.9.3 2 2022-01-27 2022-09-12
about the effect of MV1P function between version 0.1 and 0.2 1 2021-04-21 2022-08-23
tzinfo behaviour differs between stdlib and backports 2 2022-06-22 2022-09-21
Website Accessibility-WCAG 1.4.3: Ensures the contrast between foreground and background colors meets WCAG 2 AA contrast ratio thresholds (cite) 1 2021-12-26 2022-07-20
Formatting inconsistency 1 2022-09-16 2022-09-11
Type union in getEvent instead of overload 0 2021-09-10 2022-09-28
Metamask - RPC Error: header not found 0 2021-12-02 2022-09-16
Impossible to install with React 18 2 2022-04-05 2022-09-24
Can't read raw image on centos 2 2022-05-09 2022-08-02
Release 1.6.1 - add to package managers 3 2021-08-23 2022-08-21
NPM `gatsby-theme-i18n` package point to wrong place in github 2 2022-05-20 2022-09-13
自定义中间件函数报错, header function not found 1 2018-07-04 2022-09-11
BUG? Incorrect parsing of < > in generation of fields for card 0 2021-04-22 2022-09-10
Why does the 1.2 APG advocate that disable components are keyboard reachable? 16 2022-05-13 2022-09-12
New message button has border right 0 2022-09-05 2022-08-31
`crux-llvm`: Implement taxonomy of errors to classify proof obligations 0 2021-08-20 2022-09-19
Enhancement request: Add `downloadingTorrentCount` in the response of `session-stats` 0 2022-06-22 2022-09-24
getting nans with t5-large + fix 20 2021-03-21 2022-09-14
Add Monaco Editor for code and text editing 2 2022-03-09 2022-08-09
issues with `Microsoft.Batch` data-plane enum values not matching values in practice 3 2021-10-13 2022-09-18
suggest removing ; after derive attribute in case of error 1 2022-02-12 2022-09-06
WSL2 Causes weird issues every time I open an image editor while WSL2 is running 2 2022-06-06 2022-09-13
Long decimal input 0.9999... results in increasing value 3 2022-03-22 2022-09-17
Upstream `mapr` changes 3 2022-08-04 2022-09-03
is this a model db? 2 2018-01-19 2022-01-10
Now that we have reference assembly support in F# - consider how to use them for FCS and FSharp.Core nuget packages 1 2022-06-16 2022-09-29