Skip to content

Don't show the stack trace on compilation error in build definition#2091

Merged
jsuereth merged 1 commit intosbt:0.13from
Duhemm:hide-stacktrace
Jul 9, 2015
Merged

Don't show the stack trace on compilation error in build definition#2091
jsuereth merged 1 commit intosbt:0.13from
Duhemm:hide-stacktrace

Conversation

@Duhemm
Copy link
Contributor

@Duhemm Duhemm commented Jul 9, 2015

This pull request hides the stack trace on compilation error in the build definition, as suggested in #2071.

@eed3si9n eed3si9n added the ready label Jul 9, 2015
@Duhemm Duhemm force-pushed the hide-stacktrace branch from b6681ef to ea41d32 Compare July 9, 2015 07:11
@typesafe-tools
Copy link

Can one of the admins verify this patch?

@eed3si9n
Copy link
Member

eed3si9n commented Jul 9, 2015

How does output for scalaVersion := "2.11.6".xx look now?

Would it be difficult to add test for this? Could you also add notes in the style of https://raw.githubusercontent.com/sbt/sbt/0.13/notes/0.13.9/distinct-rename.markdown

@dwijnand
Copy link
Member

dwijnand commented Jul 9, 2015

Catching, logging and rethrowing looks like it would log more!

@eed3si9n
Copy link
Member

eed3si9n commented Jul 9, 2015

Could you paste the session of what the user would see for scalaVersion := "2.11.6".xx?

@Duhemm
Copy link
Contributor Author

Duhemm commented Jul 9, 2015

master… foobar ❯ xsbt                                                                                                                                                           9:15
[info] Loading global plugins from /Users/martin/.sbt/0.13/plugins
[info] Updating {file:/Users/martin/.sbt/0.13/plugins/}global-plugins...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Loading project definition from /Users/martin/Documents/Projects/Duhemm/foobar/project
[info] Updating {file:/Users/martin/Documents/Projects/Duhemm/foobar/project/}foobar-build...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
/Users/martin/Documents/Projects/Duhemm/foobar/Build.sbt:2: error: value xx is not a member of String
    scalaVersion := "2.11.3".xx,
                             ^
sbt.compiler.EvalException: Type error in expression
[error] sbt.compiler.EvalException: Type error in expression
[error] Use 'last' for the full log.
Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore?

If the user types l, then the debug log (that contains the complete stack trace) will be shown.

@dwijnand Actually the exception is re-thrown without its stack trace

@dwijnand
Copy link
Member

dwijnand commented Jul 9, 2015

Ah, that's so uncommon I completely missed it, nice.

@eed3si9n
Copy link
Member

eed3si9n commented Jul 9, 2015

I think this LGTM. @jsuereth?

@Duhemm Duhemm force-pushed the hide-stacktrace branch from ea41d32 to d7aafc6 Compare July 9, 2015 07:42
@dwijnand
Copy link
Member

dwijnand commented Jul 9, 2015

This is merging into 0.13, but has release notes for 0.13.9. Do we want this to merge into 0.13.9, or alternatively should this be fore 0.13.10?

@dwijnand
Copy link
Member

dwijnand commented Jul 9, 2015

And perhaps we should reference #2071 in the notes.

@Duhemm Duhemm force-pushed the hide-stacktrace branch from d7aafc6 to 3ce7232 Compare July 9, 2015 09:05
@Duhemm
Copy link
Contributor Author

Duhemm commented Jul 9, 2015

@dwijnand I've moved the notes and added the reference to #2071, thanks!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry 1 more thing, you need a reference to 2071 above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fixed – Sorry for all these problems!

@Duhemm Duhemm force-pushed the hide-stacktrace branch from 3ce7232 to 6c123f2 Compare July 9, 2015 09:40
@dwijnand
Copy link
Member

dwijnand commented Jul 9, 2015

LGTM. Thanks.

@jsuereth
Copy link
Member

jsuereth commented Jul 9, 2015

Thsi LGTM too.

jsuereth added a commit that referenced this pull request Jul 9, 2015
Don't show the stack trace on compilation error in build definition
@jsuereth jsuereth merged commit d2fdfb8 into sbt:0.13 Jul 9, 2015
@jsuereth jsuereth removed the ready label Jul 9, 2015
@Duhemm Duhemm deleted the hide-stacktrace branch January 27, 2016 08:10
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

Successfully merging this pull request may close these issues.

5 participants