Skip to content
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

Slightly misleading error message when failing to evaluate project #148

Closed
rosadam opened this issue Jun 16, 2015 · 3 comments
Closed

Slightly misleading error message when failing to evaluate project #148

rosadam opened this issue Jun 16, 2015 · 3 comments

Comments

@rosadam
Copy link
Contributor

rosadam commented Jun 16, 2015

Problem

When trying to issue a pride command and one of the projects cannot be evaluated, because of some exception the following error will be printed:

Could not parse module in <module-dir>

See:

throw new PrideException("Could not parse module in " + moduleDirectory + ": " + ex, ex);

It is misleading because it is not about parsing, but evaluating the project. If you issue a simple ./gradlew command the following error will be printed:

A problem occurred evaluating project ':<project-name>'.

Suggested solution

Change the output to

Could not evaluate module in <module-dir>. Run './gradlew' in the pride root to get more information about the error

Why? The ./gradlew command will evaluate the projects too, and print out a user-friendly error message with more information about the actual problem.

@lptr
Copy link
Contributor

lptr commented Jun 21, 2015

I'll put it here as well: the errors are show as part of the log already, no? So the error message could point people to scroll a little up, and see it there. Or we could actually record any errors coming from Gradle, and present them here in a more collected way.

@rosadam
Copy link
Contributor Author

rosadam commented Jun 22, 2015

No it is not shown as part of the log. It looks like this:

ERROR: Could not parse module in /my/module/path: org.gradle.tooling.BuildException: Could not fetch model of type 'PrideProjectModel' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'.

Another solution might be to inform the user to run the same command with --verbose just like gradle does:

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

@lptr
Copy link
Contributor

lptr commented Jun 22, 2015

Oh, I see. So when the build fails to run, Pride masks that by this error.
Maybe when we get an exception getting the model, we could rerun the build
through the tooling API, but this time instead of asking for a
PrideProjectModel, we could just run ./gradlew doNothing, and show the
exception there. I'll look into this.

On Mon, Jun 22, 2015 at 10:31 AM rosadam notifications@github.com wrote:

No it is not shown as part of the log. It looks like this:

ERROR: Could not parse module in /my/module/path: org.gradle.tooling.BuildException: Could not fetch model of type 'PrideProjectModel' using Gradle distribution 'https://services.gradle.org/distributions/gradle-2.4-bin.zip'.

Another solution might be to inform the user to run the same command with
--verbose just like gradle does:

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.


Reply to this email directly or view it on GitHub
#148 (comment).

Lóránt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants