What is the current behavior?
As of #3694 the NodeInfo provider includes CcInfo for the NodeJS N-API headers.
While useful for native addon development, this made the node_toolchain depend on the C++ toolchain as that CcInfo instance is pulled from the cc_library target :headers.
For workflows that don't need those headers, they incur the penalty of fetching the C++ toolchain. This can play out as;
- A sub-second delay while the repo fetches.
- A much more substantial delay (e.g. if using
nixpkgs_cc_configure from https://github.com/tweag/rules_nixpkgs)
- An error due to the C++ toolchain not being defined.
Describe the feature
Introduce a separate toolchain targeted at native addon development so that plain JS workflows do not implicitly depend on C++ toolchains.
What is the current behavior?
As of #3694 the
NodeInfoprovider includesCcInfofor the NodeJS N-API headers.While useful for native addon development, this made the
node_toolchaindepend on the C++ toolchain as thatCcInfoinstance is pulled from thecc_librarytarget:headers.For workflows that don't need those headers, they incur the penalty of fetching the C++ toolchain. This can play out as;
nixpkgs_cc_configurefrom https://github.com/tweag/rules_nixpkgs)Describe the feature
Introduce a separate toolchain targeted at native addon development so that plain JS workflows do not implicitly depend on C++ toolchains.