node-gradle / node-gradle/gradle-node-plugin
Feature request: Provide option/configuration for used architecture
Nobody has claimed this yet.
- Dominant language
- Groovy
- Stars
- 677
- Forks
- 120
- PR merge metrics
- No merged PRs in 30d
Description
Right now the plugin tries to resolve the current system and the used architecture on its own. That's okay for most use cases.
With the new Apple M1 silicon it is not that easy to determinate the correct architecture which should be used. e.g. the plugin may choose the wrong one.
For example, I want to use darwin-x64 for node<16 and darwin-arm64 for node>=16. But the Plugin will try to load darwin-arm64 even for node<16 as long as I don't use the workaround described here: https://github.com/node-gradle/gradle-node-plugin/issues/154#issuecomment-873478814
The workaround with an extra terminal started with Rosetta2 does not work for terminals inside IDEs, or Gradle executed outside of a terminal.
I would love to have an expert option/configuration to provide the architecture which should be used on my own.
Examples
node {
version = "12.22.7"
arch = "x64"
}
node {
version = "16.14.2"
arch = "x64"
}
Of course a configuration for node=12 and arm64 would fail again, because there is no NodeJS 12.x for ARM architecture available.
node {
version = "12.22.7"
arch = "arm64"
}
The arch option/configuration should be optional and if used it should prevent the architecture to be detected by the plugin
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by locating the plugin's architecture detection and Node configuration entry points, then determine where an optional arch setting can override detection. Done means the setting supports the requested architectures, remains optional, and its behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, node.js
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100