[FR]: Use hermetic Java toolchain to execute npm lifecycle hooks
What is the current behavior?
Some NPM packages execute Java or use Java paths (example package) in their postinstall hooks. Those paths currently point to the system JDK.
Describe the feature
We'd like to be able to use the Bazel Java toolchain when running lifecycle hooks instead.
Ideally this is a general solution for passing in hermetic toolchains for actions run by npm_import
We chatted about this today, have some ideas but want to start with a simple repro so we can get hands-on.
We think it's a pretty messy situation to have node-java involved (it also needs Python??) and it will be hard to make it work under Bazel the way you'd expect. Better to just not promise anything :)
If someone really wants it we need funding or contribution.