Noticed the preliminary node/js support in 2.17.*....
# general
n
Noticed the preliminary node/js support in 2.17.*.dev! Is there a blog post or documentation yet on how to write BUILD files for this new subsystem? If not, looking forward to the announcement 🙂.
w
Unfortunately not, and I don't think I'll work on this in the 2.17 cycle. Please consider the
package_json
powered backend stuff as very alpha, I'm not ready to commit to the current interface (including BUILD symbols) until there's support for package managers other than npm 🙂
To give you an idea of how immature the backend is, you cannot even specify the version of npm to use yet...
n
Fair enough. See my recent comment here for what we're doing in the meantime, but very much looking forward to native support for npm/js in the future! https://pantsbuild.slack.com/archives/C046T6T9U/p1680697325350049?thread_ts=1674580234.158039&cid=C046T6T9U
w
I do not want to be too discouraging either, the workflow you describe is almost exactly the current
node_build_script
feature of the
nodejs
backend. It's a less versatile than
adhoc_tool
but sandboxed and cache aware
resource
generator.
n
Good to hear. I also did not know about
adhoc_tool
. Does it resolve the two issues with
shell_command
(generate
resources
instead of
files
and cache results instead of expecting side-effects)?
w
No, adhoc_tool produces
files
. As for the caching, I don't know.