caddyserver / xcaddy

Build Caddy with plugins
Apache License 2.0
908 stars 110 forks source link

core: always inject the `nobadger` build tag #173

Closed mohammed90 closed 7 months ago

mohammed90 commented 7 months ago

Its simplicity making me worried I missed something

francislavoie commented 7 months ago

What if a user wants to opt out of this and actually include badger?

What if they specified this flag themselves, will it break from having it twice?

Maybe we add an XCADDY_BADGER=1 or something?

mohammed90 commented 7 months ago

What if a user wants to opt out of this and actually include badger?

This build-tag only affects the github.com/smallstep/nosql library. It'll only be an issue if a user wants to use the github.com/smallstep/nosql with badger, which I have no interest in supporting. Badger is nothing but trouble.

What if they specified this flag themselves, will it break from having it twice?

It'll work without issues. The compiler does not complain.

Maybe we add an XCADDY_BADGER=1 or something?

I don't like exposing the internal implementation this way. It feels like breaking the abstraction. It isn't something they should be aware of.