palantir / gradle-conjure

Gradle plugin that integrates with the Conjure toolchain
Apache License 2.0
5 stars 21 forks source link

Cannot use a bootstrapped installation of Node/npm when generating TypeScript #131

Open AlexLandau opened 5 years ago

AlexLandau commented 5 years ago

(This is not a current concern for me; we ended up setting up a build that doesn't use gradle-conjure, but noticed this during the development process. I felt it was worth documenting here.)

It's common for Gradle builds involving Node to bootstrap it so the user doesn't need to have a correct version of it installed on their machine (e.g. as supported by gradle-node-plugin).

However, using gradle-conjure to generate, build, and publish a TypeScript package will run node and npm from the default PATH, with no way to specify another location AFAICT. (This includes the invocation of the TypeScript generator, for which the entry point is a Node.js script.) This requires developers and CI images to have Node already installed, and in theory could lead to different results across machines if different versions are installed.

It would be nice if the location of the node and npm executables to use could be configured, so they could be pointed at a bootstrapped installation.

esword commented 3 years ago

I just hit this as well as I'm working on a PR and running tests. It is a pain to have things fail out of the box for unknown reasons. At least a comment in the CONTRIBUTING doc would be good.