SharpDevelop Community

Get your problems solved!
Welcome to SharpDevelop Community Sign in | Join | Help
in Search

Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

Last post 12-23-2009 5:21 PM by DanielGrunwald. 9 replies.
Page 1 of 1 (10 items)
Sort Posts: Previous Next
  • 12-20-2009 3:38 PM

    Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    This feature as for me increases very much productivity(up to 4-5 times) so i think its important not only for me but also for other guys.

     

    So could you please add running ms build process and style cop and fxCop during code writing?

    As for me this feature is critical

  • 12-21-2009 1:12 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    The live error reporting in Visual Studio is done using an incremental version of the Microsoft C# compiler. That compiler has no public API. I looked into using Mono's C# compiler for this task, but that doesn't work incrementally.

    The only thing we could do is periodically run a normal build - but those are too slow.

  • 12-22-2009 9:06 AM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    Is there any chance to perform some own checks with compiler similat errors texts for files being edited?

    Such as missing ;

    Invalid arguments

    When user types automatically format the code;

     

    ?

  • 12-22-2009 1:52 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    That would require us to write our own copy of the C# compiler. It's not possibly to do only "some" checks of the "Invalid argument" kind; you have to implement the whole C# specification or you will get false positives in some cases.

    If a C# compiler incorrectly accepts some kinds of expressions, it is always also possible to construct method calls with lambda expressions that are valid according to the spec but fail to compile using the buggy compiler.

    So unless we spend major effort on this feature (probably delaying everything else by about a year), it's not possible without making SharpDevelop reject valid C# programs.

  • 12-22-2009 10:37 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    Well i didn't think it is such time consuming task... As for me i thought that Visual Studio somehow just caches and runs msbuild(as Adobe Acrobat Reader does with itself) and somehow shows those bugs

     

    but now i see that all is not so simple

     

    From the other side this will increase speed of work of all people who gonna use SharpDevelop at least in 2 times(this is the main benefit of using VS+Resharper). However if i were a developer i would never agreed with writing thing i don't need or that takes such big amount of time.

    Maybe there are some tricks there such as precompiling in some form of compilable items. as i remember there must be an api for compilation in from code

  • 12-23-2009 2:11 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    The Microsoft C# compiler has no public API apart from the command line parameters you can pass to csc.exe.

    Visual Studio uses a different version of the C# compiler that has those extra features (the "VS host compiler"). But that compiler is not available outside of Visual Studio.

  • 12-23-2009 5:05 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    Does this mean that those guys from ReSharper team implemented their own compiler?

  • 12-23-2009 5:12 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    Yes.

    I've heard that ReSharper also sometimes produces incorrect results like showing errors for valid C# code; e.g. here.

    We'd need several new contributors who are experts in compiler writing to pull off something similar to ReSharper.

  • 12-23-2009 5:13 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    Also is there any chance that mono compiler team will review such case and implement the incremental model of compiling?

     

    I reviewed their editor of code for linux 2 years ago(analog of Sharp Develop) and found that it's difficult to write app in it due extremely to low performance. So if they make their compiler to perform such incremental compilation - their IDE for linux and Sharp Develop will be able to provide the same productivity fundament for rapid application development.

     

    Could you speak with them?

    I think this feature is usefull for all platforms including windows.

  • 12-23-2009 5:21 PM In reply to

    Re: Support of viewing errors, style and fxCop issues in real time in the bottom error window and in file as in VS 2010 or VS2005-2008+Reflector

    AFAIK given the current Mono gmcs code base, that would be a complete rewrite of their compiler.

    Even MonoDevelop does not use the Mono compiler for code completion, but a variant of the SharpDevelop code completion engine.

Page 1 of 1 (10 items)
Powered by Community Server (Commercial Edition), by Telligent Systems
Don't contact us via this (fleischfalle@alphasierrapapa.com) email address.