Xcaddy build fails with any module

This issue has been created since 2022-06-24.

Hello there,
I've recently tried to build caddy to work both with mercure and digitalocean and it seems I have a weird error I cannot find any clues on.

I'm trying to run caddy with the mercure submodule, but I need to make it work with digital ocean, I also have my symfony webserver running on nginx. So the caddy build is only meant to run for mercure.
I've tried to used the provided caddy build with mercure but it lacks the digitalocean submodule required to generate the ssl certificates.

So I figured out I would need to build caddy with both mercure and digital ocean submodule.

Basically here is the build command
xcaddy build --with github.com/caddy-dns/digitalocean --with github.com/dunglas/mercure --with github.com/dunglas/mercure/caddy --output mercure

And I get an error incoming from go

2022/06/24 12:44:14 [INFO] Initializing Go module
2022/06/24 12:44:14 [INFO] exec (timeout=10s): /usr/bin/go mod init caddy 
go: creating new go.mod: module caddy
2022/06/24 12:44:14 [INFO] Pinning versions
2022/06/24 12:44:14 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddyserver/caddy/v2 
2022/06/24 12:44:16 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/caddy-dns/digitalocean github.com/caddyserver/caddy/v2 
go: finding github.com/caddy-dns/digitalocean latest
2022/06/24 12:44:17 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/dunglas/mercure github.com/caddyserver/caddy/v2 
2022/06/24 12:44:18 [INFO] exec (timeout=0s): /usr/bin/go get -d -v github.com/dunglas/mercure/caddy github.com/caddyserver/caddy/v2 
2022/06/24 12:44:19 [INFO] exec (timeout=0s): /usr/bin/go get -d -v  
2022/06/24 12:44:21 [INFO] Build environment ready
2022/06/24 12:44:21 [INFO] Building Caddy
2022/06/24 12:44:21 [INFO] exec (timeout=0s): /usr/bin/go mod tidy 
caddy imports
        github.com/dunglas/mercure imports
        embed: malformed module path "embed": missing dot in first path element
caddy imports
        github.com/dunglas/mercure imports
        io/fs: malformed module path "io/fs": missing dot in first path element
caddy imports
        github.com/dunglas/mercure imports
        github.com/prometheus/client_golang/prometheus imports
        runtime/metrics: malformed module path "runtime/metrics": missing dot in first path element
caddy imports
        github.com/dunglas/mercure imports
        github.com/spf13/viper imports
        github.com/spf13/afero tested by
        github.com/spf13/afero.test imports
        testing/fstest: malformed module path "testing/fstest": missing dot in first path element
2022/06/24 12:44:21 [INFO] Cleaning up temporary folder: /tmp/buildenv_2022-06-24-1244.3377567355
2022/06/24 12:44:21 [FATAL] exit status 1

Both go and xcaddy are up to date and wondered if this is a known issue or a weird error on my side ?

Go version : go version go1.13.8 linux/amd64
Xcaddy version : v0.3.0 h1:3LTHAhHb5YKKqTLLj8kdF9cfGMl4jHV4uRbtw7LBJ6k=

I also tried to build caddy with each submodule separatly to see if it was only one of them having an issue, but I get each time a similar error on different packages depending on the provided submodules.

If you need more informations on whats going on, I'll be happy to provide.

mholt wrote this answer on 2022-06-24

Looks like you have a very old version of Go. Please upgrade your Go version to 1.18.

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
Files disappearing if deleted on discord 1 2021-12-11 2022-09-02
Can't download image files which are tagged with SPOILER 1 2022-04-17 2022-09-23
Strings, strings, strings (incl. Unicode) 1 2022-01-26 2022-09-27
idea: function helpers or generics for stacked modifiers 2 2022-03-08 2022-09-24
ASP.NET Core 7 Support 0 2022-02-17 2022-09-12
AsyncLogging::threadFunc() 中判断buffersToWrite.size()大于25和下面删除只剩2个不一致 1 2019-05-25 2022-07-28
vnpy2.7版本新增的dydx接口对用户的服务器预埋stop order不兼容 3 2021-10-27 2022-09-14
java.nio.BufferUnderflowException when running Flank for Android with Espresso 3.4.0 with compilSdkVersion 31 9 2022-01-21 2022-09-12
fix: quota-provider pod-identity 0 2021-05-03 2022-09-12
Pingcap data: too many issues in DB 3 2022-01-27 2022-02-10
AttributedText: `collapsedSpans` returns overly large `MultiAttributionSpan` for unattributed string 5 2022-06-20 2022-09-08
Upload multiple files along with filenames and content-type in a single Object or even in two separate ones for all platforms 0 2022-08-31 2022-09-27
B站视频空格暂停失效 2 2021-07-24 2021-12-29
Symfony\Component\Debug\Exception\FatalThrowableError in POST /assets/1 0 2022-05-20 2022-09-24
sota-tools-native-git-r0 do_fetch: failed to fetch URL 0 2021-02-03 2022-08-12
Autosave when VS loses focus 0 2021-06-19 2022-09-16
Docker images for 21.1.0 8 2021-04-21 2022-07-10
Missing 21.0.0 tags on DockerHub 3 2021-01-20 2022-07-31
failed to allocate 16777216 byte(s) of direct memory (used: 1811939335, max: 1816133632) io.netty.util.internal.OutOfDirectMemoryError: failed to allocate 16777216 byte(s) of direct memory (used: 1811939335, max: 1816133632) 0 2019-08-08 2022-09-25
[REACT VERSION] Fix Hackathon Component UI 1 2022-02-27 2022-09-24
The Legend of Zelda: Skyward Sword HD - 01002DA013484000 16 2021-07-19 2022-09-11
[CT-737] [Bug] Wonky pluralization when duplicate docs are found 1 2022-06-09 2022-08-26
License information supports only one format 2 2022-06-28 2022-09-29
日志rotate进行滚动的时候如何自定义滚动的文件名 1 2021-10-19 2022-09-24
make openrouteservice run on the spring-boot internal tomcat 0 2021-07-29 2022-08-27
Standard keyboard brightness keys don't work on macOS 12.5 3 2022-07-25 2022-09-19
[Impor] Error impor SIAK 1 2021-12-15 2022-07-20
Confusing error messages in development environment when using a class from a client-only dependency 1 2021-11-01 2022-09-18
dllib keras like model summary support returning string instead of printing in console 0 2022-03-29 2022-09-02
"a" is handled as an escape character in search 1 2022-03-23 2022-09-10
VM window stops updating when VirtIO display driver is uninstalled or updated 0 2021-11-07 2022-07-20
go1.17.7 install failed 3 2022-03-02 2022-09-13
MapboxSpeechSynthesizer `willSpeak` callback is not called 1 2021-11-05 2022-09-24
master and develop fail to compile. 7 2020-11-02 2022-09-21
bugfix for latest jax version (jnp.take() in version jax>=0.3.8 return nans) 1 2022-06-17 2022-09-16
Condider migrating to `std::source_location` 0 2021-06-16 2022-09-22
ReduceLROnPlateau when using chained schedulers does not work 1 2022-08-05 2022-09-24
expanded_extent_ == nullptr || isBroadcast() INTERNAL ASSERT FAILED 7 2022-08-05 2022-09-24
download video couldn't generate thumbnail 24 2021-04-26 2022-09-18
NPM complaining about this old version of diff 2 2021-03-02 2022-09-21
Resource: SCRetentionCompliancePolicy - A parameter cannot be found that matches parameter name 'TeamsChannelLocationException'. 4 2022-08-03 2022-09-24
Notification error 1 2020-09-11 2022-01-09
./setup_module syntax error: got (, expecting Newline 1 2021-05-14 2022-08-01
Client Allocation Request for: 2 2021-10-29 2022-07-26
chore: bump Node to ESLint 8.0 ranges 3 2021-08-21 2021-11-08
Set up your store step - suggestion to review copy 1 2022-05-17 2022-09-01
rules_cuda example fails to run 1 2021-05-14 2022-09-29
VPA: Error getting Admission Controller status: leases.coordination.k8s.io "vpa-admission-controller" not found. Skipping eviction loop 4 2022-07-06 2022-09-25
Migrate `RegexFeaturizer` to GraphComponent interface 0 2021-08-25 2022-09-24
"它们俩是一样的" 这句翻译不符合语境 0 2019-10-11 2022-01-03