[Mono-dev] MoMA 1.1 - analysing "MoMA.Analyzer.dll"

Jonathan Pobst monkey at jpobst.com
Wed Dec 20 21:09:40 EST 2006


Just to add, this is in fact what MoMA is doing.  I couldn't get 
asynchronous downloading of new definition files to work on Mono.  (And 
I was rushing to get it out with 1.2.2 so I didn't investigate further.) 
  So I check whether MoMA is running on Mono, if it is, then it does the 
download synchronously.

The only difference to the user is that there is a little animated 
spinner that spins while the new definitions are downloading.  On Mono, 
since the download is synchronous, the UI is blocked and the spinner 
doesn't actually spin.

There are certainly ways around this, but I don't feel the current 
situation is bad enough to warrant writing a more complex workaround.  :)

pobst


Jonathan Pryor wrote:
> On Mon, 2006-12-18 at 10:28 +0000, Miguel Sousa Filipe wrote:
>> this is a bit off-topic but I think its worthy of mentioning.
>> running MoMA on the MoMA's "MoMA.Analyzer.dll" will report that there
>> are problems in that dll:
>>
>> 1- Not implemented exception
>> 1- MonoTodo.
>>
>> isn't that a bug?
> 
> No, it's a limitation of static analysis.
> 
> Consider the following code fragment:
> 
> 	if (Path.DirectorySeparatorChar == '\\')
> 		CallWin32Method ();
> 	else
> 		CallLinuxMethod ();
> 
> MoMA isn't going to evaluate the call -- that's what the runtime  is
> for, evaluating/executing IL -- all MoMA will see is CallWin32Method(),
> which it will warn about.  You, as the developer, will have to inspect
> the code, realize that it's already handling platform differences, and
> then ignore the warning.
> 
> (Certainly MoMA could be enhanced to recognized switching on
> Path.DirectorySeparatorChar, but there are other techniques for platform
> detection, and/or it could be nested within a method call...  There's
> only so much you can do without executing the IL.)
> 
>  - Jon
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 
> 




More information about the Mono-devel-list mailing list