https://pantsbuild.org/ logo
#general
Title
# general
n

nice-florist-55958

04/05/2023, 12:13 PM
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

worried-painter-31382

04/05/2023, 12:17 PM
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

nice-florist-55958

04/05/2023, 1:01 PM
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

worried-painter-31382

04/05/2023, 1:58 PM
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

nice-florist-55958

04/05/2023, 3:20 PM
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

worried-painter-31382

04/05/2023, 3:26 PM
No, adhoc_tool produces
files
. As for the caching, I don't know.
2 Views