worried-painter-31382
06/28/2025, 5:44 PMadhoc_tool is eating the js backends lunch, which speaks to how versatile adhoc_tool is. Would like to unify the backends so that features added to adhoc_tool naturally fits for js scripts too, i.e package_json(scripts=[<adhoc-stuff-like-system_binary-and-workspace_environment-works-here>], ...). It looks do-able from a distance but a substantial change.fast-nail-55400
06/28/2025, 8:16 PMfast-nail-55400
06/28/2025, 8:16 PMwide-midnight-78598
06/29/2025, 12:34 PMpython_sources and python_tests (due to js, jsx, ts, tsx).
I don't really know what the solution is here though - but I think evaluating the api of the js/ts backends would be a start, but to your point - I do think a lot of the internals could benefit from adhoc_tool as an implementationworried-painter-31382
06/29/2025, 12:56 PMworried-painter-31382
06/29/2025, 12:59 PMworried-painter-31382
06/29/2025, 1:01 PMnode_build_script (and soon to be node_run_script) and adhoc_tool have almost the same api, just one got implemented before the other.worried-painter-31382
06/29/2025, 1:03 PMworried-painter-31382
06/29/2025, 1:04 PMwide-midnight-78598
06/29/2025, 1:04 PMwide-midnight-78598
06/29/2025, 1:06 PMworried-painter-31382
06/29/2025, 1:06 PMI mean, I think this statement here kinda points to what I was talking about, in that there is currently a bit of an impedance mismatch between JS/TS and Pants.I dont understand this comment, sorry
worried-painter-31382
06/29/2025, 1:07 PMworried-painter-31382
06/29/2025, 1:08 PMworried-painter-31382
06/29/2025, 1:11 PMwide-midnight-78598
06/29/2025, 1:13 PMpants run could use directly. Essentially, the one package.json ran the show, but I think my version assumed that the packageManager field was populated. Then I started moving stuff to deno - and it kinda all fell apartwide-midnight-78598
06/29/2025, 1:14 PMworried-painter-31382
06/29/2025, 1:22 PMworkspace_environment could be the "make it easier to build wasm modules" part. But if it is to be sandboxed then you have to provide the sandbox with the stuff, that's the pants model.worried-painter-31382
06/29/2025, 1:23 PMworried-painter-31382
06/29/2025, 1:24 PMworried-painter-31382
06/29/2025, 1:26 PMcheck_node_script, lint_node_script ... etc seem not greatwide-midnight-78598
06/29/2025, 1:26 PMwide-midnight-78598
06/29/2025, 1:28 PMwide-midnight-78598
06/29/2025, 1:32 PMIn my case, it was something more like auto-mapping to generate a,check_node_script... etc seem not greatlint_node_script
pants run path/to/package:my-script1 and then known goals could be mapped into pants lint - but it was just dictionary-style, so not a lot of boilerplate - but still boilerplatewide-midnight-78598
06/29/2025, 1:35 PMfast-nail-55400
06/29/2025, 1:39 PMI hear you, and I thinkA siide note: A backend can run processes in the workspace without needing acould be the "make it easier to build wasm modules" part. But if it is to be sandboxed then you have to provide the sandbox with the stuff, that's the pants model.workspace_environment
workspace_environment provided by a user by directly constructing a ProcessExecutionEnvironment with execute_in_workspace=True and passing via implicitlyworried-painter-31382
06/29/2025, 1:51 PMnode_modules to sandboxesfresh-mechanic-68429
09/25/2025, 12:59 AMfast-nail-55400
09/25/2025, 1:52 AMnode_modules to sandboxes
and which can be set up programmatically in rule code without a user needing to define a workspace environment.worried-painter-31382
09/25/2025, 7:12 AM