-
Notifications
You must be signed in to change notification settings - Fork 246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for explicitly specifying node entrypoint location #3889
Comments
I've created #3890 to demonstrate how this will work for go. If you're down with this approach I can implement the remaining runtimes. |
Is this not the same as ensuring the "correct" node is the 1st in |
In normal cases, yeah. However, with bazel (and go) there are complexities
|
While aws/jsii#3889 would be the best possible outcome for supporting arbitrary languages, this hacks around the current implementation looking up the node bin from the path, as well as hacking around go's refusal to look up binaries that are in a relative directory.
While aws/jsii#3889 would be the best possible outcome for supporting arbitrary languages, this hacks around the current implementation looking up the node bin from the path, as well as hacking around go's refusal to look up binaries that are in a relative directory.
While aws/jsii#3889 would be the best possible outcome for supporting arbitrary languages, this hacks around the current implementation looking up the node bin from the path, as well as hacking around go's refusal to look up binaries that are in a relative directory.
By default, jsii-go will lookup the node entrypoint from the PATH. This allows users to override with a specific node entrypoint via the JSII_NODE environment variable. issue: #3889 --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the feature
Similar to how one can specify the runtime via
JSII_RUNTIME
, there should also be support for providing an explicit location for the node entrypoint with fallback to searching the path.Use Case
For my particular use case, I'm writing bazel rules to handle executing cdk apps written in arbitrary languages. In this case, manipulating the path to ensure the correct node entrypoint is present and has the correct priority is problematic and non-standard across language_binary targets. By comparison, having an explicit environment variable for setting the node entrypoint would be straightforward to support.
Proposed Solution
Add a
JSII_NODE
environment variable option to specify the exact location of the node entrypoint. if unset, fallback to existing behavior of environment lookup.Other Information
No response
Acknowledgements
CDK version used
2.55.0
Environment details (OS name and version, etc.)
mac/linux
The text was updated successfully, but these errors were encountered: