Noob question: Is there a way to add a tool to the...
# general
h
Noob question: Is there a way to add a tool to the sandbox without modifying the built-in plugins? Context: I am trying to use package_json with node_build_scripts to build my NodeJS project. But I have a git based package dependency. NPM requires "git" available in the path. I have tried adding a system_binary target and passed that as a dependency to the package_json; but that didn't do anything. It looks like the only way is to modify the NodeJS subsystem for additional BinaryShimRequest. Is that accurate?
f
I am sorry, are you writing an own plugin? Just in case, I assume you've seen the experimental support of JS with Pants? Take a look at the example repo if you'd like to experiment. https://github.com/AlexTereshenkov/example-javascript
h
No, I am using the experimental JavaScript backend. The problem is that one of my NPM dependencies is git based (e.g. "mdb-react-ui-kit": "git+https://..."). When the JavaScript backend runs "npm clean-install"; npm fails because git binary is not in the execution sandbox. I am trying to figure out how to make git available to npm process.
👀 1
f
@worried-painter-31382 please
w
Yea this is not supported in the backend currently. Adding support for
system_binary
dependencies to
package_json
sounds like a great solution though. The current approach feels doomed to fail
h
@worried-painter-31382 I think I am equipped to create a PR to make package_json support system_binary dependencies. It sounds like a good first contribution. I am a bit concerned that this may be a more common need for other backends as well; and may need broader conversation. Would you be okay if I contributed a narrow solution that addresses package_json; and then I create an issue for broader conversation?