[Mono-dev] [PATCH] System.Linq.Expressions, v2

Marek Safar marek.safar at seznam.cz
Wed Aug 15 14:45:09 EDT 2007


Hello,

I disagree, we should fix StringBuilder in 2.1 profile and not introduce
new hacks everywhere else.

My suggestion for cases like this is to use #ifdef for AppendFormat
in 2.1 profile and compiler will deal with overloads in each profile
automatically.

Marek

> Thanks for your work on System.Core.
>
> However, since your last patches, the tuner (the tool to create the
> 2.1 assemblies for moonlight) now shows warning in System.Core:
>
> [check] in assembly System.Core, Version=2.1.0.0, Culture=neutral,
> PublicKeyToken=b77a5c561934e089
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x00d5 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x00f2 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x010f in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x012c in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0149 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0166 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0183 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x01a0 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x01bd in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x01da in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x01f7 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0214 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0231 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x024e in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x026b in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0288 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x02a5 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x02c2 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x02df in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x02fc in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0319 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x034b in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x0368 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x039a in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
> [check] Operand `System.Text.StringBuilder
> System.Text.StringBuilder::AppendFormat(System.String,System.Object,System.Object)`
> of type InlineMethod at offset 0x03b7 in method `System.Void
> System.Linq.Expressions.BinaryExpression::BuildString(System.Text.StringBuilder)`
> is not visible
>
>
> That means that the StringBuilder::AppendFormat(string,object,object)
> is not visible in 2.1, and System.Core have to work for the 2.0 and
> 2.1.
>
> A fix would be to use an helper function:
>
> static void AppendFormat(StringBuilder sb, string format, params object [] args)
> {
>     sb.AppendFormat (format, args);
> }
>
> And use it instead of calling sb.AppendFormat (foo, bar, baz).
>
> Thanks for keeping an eye on this,
>
>   




More information about the Mono-devel-list mailing list