debug information

113 views
Skip to first unread message

Sjaak Derksen

unread,
Jan 9, 2014, 7:44:06 AM1/9/14
to mapstru...@googlegroups.com
Hi,

I noticed that MapStruct diagnostics (warnigns) are only printed when maven runs with option --debug.  This has the drawback that the debug information appears cluttered with a lot of other debug information. It would be a great improvement to write debug information to stdout during the build, controlled by a Mapstruct plugin configuration option. One could even consider to do this always, but switch it off by means of plugin configuration (e.g. a verbose option).

Best regards,
Sjaak



Gunnar Morling

unread,
Jan 10, 2014, 12:32:54 PM1/10/14
to mapstru...@googlegroups.com
Hi,

On Thursday, January 9, 2014 1:44:06 PM UTC+1, Sjaak Derksen wrote:
Hi,

I noticed that MapStruct diagnostics (warnigns) are only printed when maven runs with option --debug.  This has the drawback that the debug information appears cluttered with a lot of other debug information.

Diagnostics of kind WARN are definitely supposed to show up during a regular build, i.e. without any options.

How are you running the processor in Maven? It may be that you run into http://jira.codehaus.org/browse/MCOMPILER-66. I recommend to use the maven-processor-plugin (that's what's used in the integration test module). Doing so makes warnings show up like this:

    [INFO] diagnostic /.../SourceTargetMapper.java:35: warning: Unmapped target property: "foobar"
    Target sourceToTarget(Source source);
 
It would be a great improvement to write debug information to stdout during the build, controlled by a Mapstruct plugin configuration option. One could even consider to do this always, but switch it off by means of plugin configuration (e.g. a verbose option).

Yes, that'd be nice. There is already an issue for such a processor option (https://github.com/mapstruct/mapstruct/issues/37), but so far no one was in the mood of implementing it :) It would be cool to get some information which helps to understand if mappings fail etc. I think such information could be written out with diagnostic kind NOTE if the verbose mode is enabled.

Best regards,
Sjaak

Hope that helps and have a great weekend,

--Gunnar
 
Reply all
Reply to author
Forward
0 new messages