Re: MSVC build problems after updating from git




Den 2014-11-28 20:06, John Emmas skrev:
On 28/11/2014 13:58, Kjell Ahlstedt wrote:
 
The message is printed by glibmm/tools/pm/DocsParser.pm, line 378-379,

  print STDERR "gmmproc: $main::source: $obj_name: Example code discarded.\n"
    if ($example_removals);

There are other warnings that contain $main::source. If you can tell what suits MSVC, I can modify them. I think the word error in the message can confuse human readers as well as MSVC.
I'd prefer error.hg|ccg or error.hg or something like that. The .hg file is more important than the .ccg file here.


Phew - this has had me tearing my hair out for the whole afternoon!

Up to now, the output text from those lines looked something like this:-

        gmmproc: error: GIOErrorEnum: Example code discarded.

Basically what I found was that if the text "error" appears anywhere between the 1st and 2nd colon, MSVC assumes that an error occurred.  It makes no difference if those characters are on their own or as part of some other string.  So all these variations will get regarded as an error:-

        print STDERR "gmmproc: error: $obj_name: Example code discarded.\n";
        print STDERR "gmmproc: something_with_error_in_it: $obj_name: Example code discarded.\n";
        print STDERR "gmmproc: \"no error detected\": any text here: Example code discarded.\n";

I also tried printing to STDOUT (in the hope that the word "error" on STDOUT mightn't get interpreted as an error - but no such luck  :-(

In the end, I found that the only real solution is to remove that first colon (after 'gmmproc').  I experimented with a few variations and my favourite was probably this one:-

        print STDERR "gmmproc ($main::source.hg) - $obj_name: Example code discarded.\n"
            if ($example_removals);

The resulting text looks like this:-

        gmmproc (error.hg) - GIOErrorEnum: Example code discarded.

Note that there's only one colon!  To my eyes, that looks the most pleasing - but of course, it no longer matches the other printouts which have multiple colons - so (for neatness) they'd probably all need to get adjusted.  Kjell - if you have any other preferences that you'd like me to try, just list them in an email and I'll try them over the weekend.  Thanks again,

John


Don't let gmmproc write a filename (or perhaps a class name, such as Error, or a method name, such as get_error()?) between the first and the second colon on a line. Is that the result of your investigation? Isn't there a way to inform MSVC that it shall not try to interpret the output from gmmproc? I found this link: http://msdn.microsoft.com/en-us/library/ms171484.aspx. I don't know if it's relevant.

If we have to change gmmproc, I think I prefer
gmmproc, error.h, GIOErrorEnum: Example code discarded.
in this case. There are several other print directives in gmmproc that are potentially problematic.

Kjell




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]