[Mono-bugs] [Bug 379535] New: [2.0] CSharpCodeCompiler: (g) mcs compilation summary considered as error

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sun Apr 13 10:38:56 EDT 2008


           Summary: [2.0] CSharpCodeCompiler: (g)mcs compilation summary
                    considered as error
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: gert.driesen at pandora.be
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

In the 2.0 profile, the compilation summary message that is written to stdout
by (g)mcs is treated as an error message.

For the 2.0 profile, we check both stdout and stderr for errors/warnings while
on the 1.0 profile we only do this for stderr.

Possible solutions:

1) Explicitly check for the compiler summary message, and ignore it.
2) Ignore messages written to stdout, like we do for the 1.0 profile.

To reproduce, compile and run the following code snippet:

using System;
using System.CodeDom.Compiler;

using Microsoft.CSharp;

class Program
        static void Main ()
                const string source = @"
                        public class Scriptefaa4ad0a85c49519cad6a19fbb93caf
                                string PadRight (string str, int padding)
                                        return str.PadRight(padding);

                CompilerParameters parameters = new CompilerParameters ();
                parameters.GenerateInMemory = true;

                CodeDomProvider provider = new CSharpCodeProvider ();
#if NET_2_0
                CompilerResults results = provider.CompileAssemblyFromSource (
                        parameters, source);
                ICodeCompiler compiler = provider.CreateCompiler ();
                CompilerResults results = compiler.CompileAssemblyFromSource (
                        parameters, source);

                Console.WriteLine ("HasErrors:" + results.Errors.HasErrors);

Expected result:


Actual result:


Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list