A "just make it build" button #72698
Unanswered
daiplusplus
asked this question in
Ideas
Replies: 1 comment 1 reply
-
Being able to say "I don't care" to Roslyn Analyzers at the very least would be useful; compiler-level errors (say an invalid class name) I could see being much more complicated to implement |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In situations like these, especially if it happens at 3am, the way out is to just mechanically address each syntax error reported by the compiler, while the "interface not implemented" and "function does not return a value" errors can be resolved with a swift application of copy+pasting "
throw new NotImplementedException();
" a few dozen times throughout your codebase. There. Boom. Now it builds! The unit tests pass. Hurrah!After having that happen to me far-too-often now - and rather than doing the sensible thing and try to change my working habits - I realise that what I want is a big fat (and ideally red-coloured) button labelled "make it build". This button wouldn't be magic, nor would it need to pull-in any AI/LLM/ChatGPT services either: it would simply and mechanically replace every compiler-reported syntax-error with an
#if TODO_FIX_LATER ... #endif
which would surround whatever syntactically valid braces, statements/control-structures indentation remain - thus fixing any syntax or structural errors in the compiler, while also strategically placing thosethrow new NotImplementedException()
landmines (and more#if
regions) at-and-around applicable compiler errors. It's what I already do, but doing this manually is very tedious (doubly-so because eventually we need to remove those changes) which just isn't a good use of our time. Because it's such a simple process it's something that I believe the IDE tooling (e.g. a Roslyn-based analyzer, with the ability to apply patches/edits to code) could do for us.Assuming this would be an effective way to save dev-time, while being as straighttforward and simple to implement as my sheer naïveté in this problem-space then it probably is worth it for me to invest some time in building it using Roslyn-based tooling, perhaps as a VS VSIX Extension (for the ability to apply edits to code, something Roslyn analyzers can't do by themselves - and for getting to create that lovely, lovely big red button I keep fantasizing about. Maybe it will get really popular enough that MS builds it right into VS...
I'd like to know if this idea has been attempted before - and/or if this something no-one is really itching for and I need better hobbies.
I did some cursory research and found some interesting things like this MSR paper from 2012 about automatic program repair, though they're looking at automatically resolving correctness bugs in code that already compiles, whereas my interest is only about sweeping compiler errors under-the-rug. I also I assume my searches are returning little because I'm probably using the wrong terminology/search-terms - so please speak-up if there's something I've missed - or if you actually think this might be a good idea? (hah)
Beta Was this translation helpful? Give feedback.
All reactions