aspect-build / aspect-build/rules_js

[FR]: Use hermetic Java toolchain to execute npm lifecycle hooks

Open
#1,480 2 comments 1 reaction 0 assignees View on GitHub
enhancement need: funding
Dominant language
Starlark
Stars
378
Forks
183
Avg merge
1d 9h
Merged PRs (30d)
32

Description

### What is the current behavior?

Some NPM packages execute Java or use Java paths ([example package](https://github.com/joeferner/node-java)) 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`

Contributor guide

Open the contributing guide

Research direction

Start at the npm_import entry point and trace how lifecycle hooks currently receive Java paths from the system JDK. Investigate how a Bazel Java toolchain could be passed to those actions, then define completion as a general hermetic toolchain mechanism that works for npm lifecycle hooks and the example Java-using package.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, javascript
Domain
build-system, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.