mcve

https://github.com/git-for-windows/git/issues/1780

 

It's an acronym (Stargateur was kind enough to point out the help center article about it - had I known that existed, I would have just linked to it):

  • (M)inimal
  • (C)omplete
  • ( V ) erifiable
  • (E)xample

It refers to the least amount of code required for someone to run the program on a stated architecture and be likely to reproduce the problem that's being described in the question.

Now how that's given can vary because languages treat dependencies in different ways. If your code depends on a static library (which might be proprietary), then you'd need to provide something to mock it, if it's not possible to isolate the code around it.

Likewise, if your code relies on dependency injection, you might need to provide a mock setter, or just annotate the code to indicate that you've eliminated that part as being problematic.

So "minimal" in some cases can actually be quite large, even with every effort given to offer only the code needed to reproduce an issue. It's in those cases where it's really likely that debugging prior to asking hasn't been done as optimally as possible, and help on how to diagnose the problem might be what's needed.

The term is expressed sort of eternally in an ideal sense, in hopes of guiding people to not paste their entire project into the body of the question - results vary from language to language.

In the best of outcomes, those that haven't fully optimized the example code to be as minimal as possible are shown how to better isolate problems using tools that they probably have. In the worst outcomes, the question is put on hold, and the user may or may not receive additional advice on how to debug, depending on how much time people have and how easily the chunk of code they did post can be processed.

In most cases, just indicating that you've done your best to post the minimum amount needed and tested it to see if the problem reproduces is enough to earn quite a bit of goodwill, and cause people to be more likely to help you further debug (which generally obviates the question anyway).

Guess you like

Origin www.cnblogs.com/chucklu/p/12709342.html