IDE support for formula development #1130
Replies: 1 comment 5 replies
-
It filters almost all variables. What it keeps depends on the formula and the environment you're running things in.
I'm sure that if you write the code people will happily review it and merge it if it's up to our standards. But I have to say that in 5 years of contributions to homebrew with simple text editors like nano or sublime text I don't think there has been a situation where a more advanced IDE would have helped me write a formula. Most things in formulae aren't complex functions after all, they're more like |
Beta Was this translation helpful? Give feedback.
-
From my experience of getting my IDE to work with formula development, I've found that there are a lot of missing environment variables in order to replicate the build process of the formula. Particularly the difference between what's available in
brew sh
andbrew install -s
, e.g.CMAKE_PREFIX_PATH=/usr/local
in the former, while the latter is added by various other packages depending on the formula:/usr/local/opt/libffi:/usr/local/opt/[email protected]:/usr/local/opt/readline:/usr/local/opt/sqlite:/usr/local/opt/tcl-tk:/usr/local/opt/icu4c:/usr/local
.So I would like to start some discussion on how to best implement these missing variables, either manually or via a command. Specifically:
brew sh
: does it scrub all of the initial environment variables and generate them from scratch? E.g. if we run it from an app some variables such asDYLD_LIBRARY_PATH
are wiped by Mac, so doesbrew sh
depend on any of such initial variables?brew sh {formula}
: similar tobrew sh
andbrew install -s --interactive
, but simply read the formula, and initialize a shell environment depending on thedepends_on
similar to how thebrew install -s
environment is constructed. And compared tobrew install -s --interactive
it should not download, create tmp folders, etc. so it can better be used in IDEs.Beta Was this translation helpful? Give feedback.
All reactions