Disable Debug Assertion for Parsing NPM Person objects#722
Disable Debug Assertion for Parsing NPM Person objects#722mjbvz merged 13 commits intomicrosoft:masterfrom
Conversation
This class is just a simple structure and its constructors should not be doing all this parsing.
This gets hit literally thousands and thousands of times during debugging, making it worthless. Person can be a string too, so the assertion is not even accurate.
|
Hi @mjbvz, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
| if (group.Success) { | ||
| Name = group.Value; | ||
| if (@group.Success) { | ||
| name = @group.Value; |
There was a problem hiding this comment.
Weird... I was wondering about those names but thought it was intentional. Reshaper's extract messed something up here. Will undo this.
| @@ -1,310 +1,310 @@ | |||
| /* **************************************************************************** | |||
There was a problem hiding this comment.
You should be able to remove this change now that #709 has been merged
|
Ok, I removed the string person regex stuff for now, addressed the other comments, and have synced with master to get rid of any line ending changes. |
|
@mousetraps can you please take another quick look at this review. This currently makes debugging a pain if you ever accidentally trigger the npm download, plus the assertion is not even correct to being with. |
|
test categories still need to be updated but 👍 after that! |
Disable Debug Assertion for Parsing NPM Person objects
Defect
While debugging, Npm
Personends up throwing thousands and thousands of exceptions because the Json data it is receiving from NPM is invalid according to its current check. It expects an object, but a person in a package.json may also be a string: https://docs.npmjs.com/files/package.json#people-fields-author-contributorsFix
Personto a factory namedCreateFromJsonSource. This should make it clear to callers what this function does.A whitespace only change to InteractiveWindow.cs is included in this PR. Git automatically created this change and I cannot undo it without manually editing the .gitattributes file. I think we just need to commit this file again so that git is no longer confused about the line endings in this file.