Is there an easy way to contribute+collect env var...
# development
b
Is there an easy way to contribute+collect env vars from dependencies attached to the source? E.g. A
resource
or
file
which also when materialized has its path added to
LD_LIBRARY_PATH
. 🤔 Edit: This actually goes deeper, because it'd be really performant to leverage `immutable_input`s, but I can't inject that either 🤔
might want to pursue this. @witty-crayon-22786 this might relate to my earlier idea of sandbox preservation only applyng to "the final process". These would be injectable (union?) in only "the final process"
w
hm. not sure what you mean.
there are two aspects of this:
immutable_inputs — they should likely be used for many more things than they are, hence my suggestion that we should make that API easier to use: https://github.com/pantsbuild/pants/issues/14070#issuecomment-1227645527
environment variables to expose libraries — that sounds like a case for either a: 1. typed dependency field to say “oh, this thing that i said was a file/resource? it’s actually a library” 2. different target type to do the same
@fast-nail-55400 and @wide-midnight-78598 would likely have better insight into how to model native dependencies in this case (from Rust/(c)go and c/swift, respectively)
b
Modeling it as a plug-in thing might be useful. Similarly, as far as env vars so, adding something to PYTHONPATH, or setting JAVA_HOME could be interesting.