Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: compile without nosql's support for Postgres and MySQL #210

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

dunglas
Copy link
Contributor

@dunglas dunglas commented Oct 22, 2024

@francislavoie
Copy link
Member

Linter is complaining about G115, we silence that one in Caddy, we can do that here too in .golangci.yml

  exclude-rules:
    - text: 'G115'
      linters:
        - gosec

@francislavoie francislavoie merged commit c9fe5af into caddyserver:master Nov 5, 2024
8 checks passed
@dunglas dunglas deleted the chore/better-build-tags branch November 5, 2024 19:37
@dunglas
Copy link
Contributor Author

dunglas commented Nov 5, 2024

Thanks Francis, sorry I forgot about this PR.

@steffenbusch
Copy link

My build script, which installs xcaddy@latest is just running into issues since v0.4.3 release and the caddy build fails with this error:

2024/11/05 22:55:34 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /root/out/caddy_2024-11-05_225334 -ldflags -w -s -trimpath -tags nobadger nomysql nopgx
package nomysql is not in std (/usr/local/go/src/nomysql)
package nopgx is not in std (/usr/local/go/src/nopgx)

With go install github.com/caddyserver/xcaddy/cmd/xcaddy@v0.4.2 it still works.

@@ -152,7 +152,7 @@ func (b Builder) Build(ctx context.Context, outputFile string) error {
cmd.Args = append(cmd.Args,
"-ldflags", "-w -s", // trim debug symbols
"-trimpath",
"-tags", "nobadger",
"-tags", "nobadger", "nomysql", "nopgx",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be something like this:

"-tags", "nobadger,nomysql,nopgx",

@mohammed90
Copy link
Member

My build script, which installs xcaddy@latest is just running into issues since v0.4.3 release and the caddy build fails with this error:

2024/11/05 22:55:34 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /root/out/caddy_2024-11-05_225334 -ldflags -w -s -trimpath -tags nobadger nomysql nopgx
package nomysql is not in std (/usr/local/go/src/nomysql)
package nopgx is not in std (/usr/local/go/src/nopgx)

With go install github.com/caddyserver/xcaddy/cmd/xcaddy@v0.4.2 it still works.

Fix in: #213

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants