José F. Romaniello

Las aventuras y desventuras de un codificador.

Note; this is an English version of my original post.

A few days ago I found a bug in Moq, the Mock framework I am currently using. I had a feeling for the stack trace of the exception was a DynamicProxy error, knowing that Moq uses DynamicProxy Castle and knowing a little DynamicProxy, I decided to investigate Moq inside.

The first thing I did was write a test in Moq that fail, but guess what, this is a very rare type of error related to the Visual Studio debugger, so if the debugger is not hooked, the error does not occur. The second thing I did was to isolate the problem to DynamicProxy, and that's when I really realized it was directly related to DynamicProxy. Then try to reproduce the problem in the trunk of dynamicproxy version, which obviously is not what my Moq version was using. And failed. Everything I have said to this point has been with some help from my friend from Poland, Krzysztof Kozmic. But here is where my involvement with the story ends. And you can read the whole thread here.

I’ve opened then the issue DP-115, and this is where the work of Krzysztof begins. He commented, that along the way, he found bugs on:

  • Reflector
  • Resharper
  • And finally this appears to be a bug in the debugger.

I can only imagine the complexity of the work of Krzysztof. I come closely following the footsteps of Krzysztof, simply because I'm passionate to learning about this subject. I have seen wonderful things like this, which is practically the backstage of DynamicProxy ... In 35 lines of code, my friend has created a type, inheriting an interface, has defined the generics methods of the interface with constraints, has created an assembly and saved the assembly. WAW!

Congratulations to Krzysztof for his amazing job, and thank you for the sparks that let us learn!, now he can read this post that was originally wrote in Spanish.

| More

0 comentarios:

Publicar un comentario en la entrada