Optional deps with at least one required #5795
Replies: 1 comment 10 replies
-
Please see https://docs.brew.sh/Formula-Cookbook#specifying-other-formulae-as-dependencies
|
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Output of
brew config
Output of
brew doctor
Description of issue
Hello,
I was looking at the formula for pgvector and wanted to suggest an improvement.
Being an extension to Postgres it needs Postgres to be installed, this is currently achieved by directly depending on
postgresql@14
andpostgresql@17
. I wanted to suggest an improvement to this formula that changes this to optional dependencies e.g.However, a user should specify at least one of these optional dependencies.
Thus my questions are:
install
if this condition isn't met?depends_on "postgresql@17" => :optional
todepends_on "postgresql@17" => [:build, :test]
if the user does not specify any version of Postgres explicitly?@ankane I'm happy to contribute this if you like the direction
Beta Was this translation helpful? Give feedback.
All reactions