https://bugzilla.novell.com/show_bug.cgi?id=379535
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: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
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);
#else
ICodeCompiler compiler = provider.CreateCompiler ();
CompilerResults results = compiler.CompileAssemblyFromSource (
parameters, source);
#endif
Console.WriteLine ("HasErrors:" + results.Errors.HasErrors);
}
}
Expected result:
HasErrors:False
Actual result:
HasErrors:True
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs