srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

Error messages that someone can actually do something about. #364

Closed jlczuk closed 4 years ago

jlczuk commented 4 years ago

I am trying to use this plugin to build a web application on the mainframe z/OS operating system. It turns out it is not supported by default in this plugin. That's ok, but the error message was not very helpful and I'll explain why.

My jenkins CI build runs and fails. This is the message:

---------------------------------------
Performing a native z/OS build
---------------------------------------

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':MgmtServicesWAR'.
> Unsupported OS: z/os

The error message might be useful to someone working in and testing the plugin, but to a build engineer, this is a cognitive dead end. Why force someone to have to do a search and hope they get lucky enough to find out why this error message was issued?

That's what happened to me, and I was fortunate enough to have crafted a search that got me to this github project.

Please, when communicating error information, do so by assuming the persona of the end-user community and try to understand the context in which they'll be receiving the message.

This particular message really needs to minimally have information identifying the plugin from which it was issued. It wouldn't hurt to provide some additional textual context in the message explaining a bit more. Sure, you don't support z/OS got that. But what is being done that requires specific OS support.

Honestly, I don't expect anything to change here, but I wanted to give the maintainers something to consider.

Thank you for providing this plugin.

deepy commented 4 years ago

I agree the error message is at best bare, but all of this information is available when using --stacktrace

As for OS support, there's no official binary for z/os https://nodejs.org/en/download/ and that's why the build is breaking.

For this to work you either need to exclude the tasks from your build, or install node locally and use

node {
    download = false
}

This plugin might be dead, but if you got a suggestion on a better term we'll happily consider it in the fork https://github.com/node-gradle/gradle-node-plugin

jlczuk commented 4 years ago

Thanks @deepy, I will move over to the node-gradle/gradle-node-plugin project.