[@types/underscore] Collection and Array Tests - Compact and Range#46189
Conversation
|
@reubenrybnik Thank you for submitting this PR! This is a live comment which I will keep updated. Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 46189,
"author": "reubenrybnik",
"owners": [
"borisyankov",
"jbaldwin",
"ccurrens",
"confususs",
"jgonggrijp",
"ffflorian",
"regevbr",
"peterblazejewicz",
"reubenrybnik"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "d990050",
"headCommitOid": "d9900505ff7bb6c93d6751c97ef08d7274ef0097",
"mergeIsRequested": true,
"stalenessInDays": 0,
"lastPushDate": "2020-07-22T21:38:05.000Z",
"lastCommentDate": "2020-07-24T01:44:26.000Z",
"maintainerBlessed": false,
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/46189/files",
"hasMergeConflict": false,
"authorIsOwner": true,
"isFirstContribution": false,
"popularityLevel": "Popular",
"anyPackageIsNew": false,
"packages": [
"underscore"
],
"files": [
{
"path": "types/underscore/index.d.ts",
"kind": "definition",
"package": "underscore"
},
{
"path": "types/underscore/underscore-tests.ts",
"kind": "test",
"package": "underscore"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"lastReviewDate": "2020-07-23T23:49:15.000Z",
"reviewersWithStaleReviews": [],
"approvalFlags": 2,
"isChangesRequested": false
} |
|
🔔 @borisyankov @jbaldwin @ccurrens @confususs @jgonggrijp @ffflorian @regevbr @peterblazejewicz — please review this PR in the next few days. Be sure to explicitly select |
|
👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings. Let’s review the numbers, shall we? Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
jgonggrijp
left a comment
There was a problem hiding this comment.
There are some details that I think need sorting, but as always, this definitely looks like it's going to be an improvement.
|
@reubenrybnik One or more reviewers has requested changes. Please address their comments. I'll be back once they sign off or you've pushed new commits or comments. If you disagree with the reviewer's comments, you can "dismiss" the review using GitHub's review UI. Thank you! |
|
@jgonggrijp I'm at a point where I'd appreciate some more feedback on all of your comments with no changes yet, but while @typescript-bot claims that I can "dismiss" your review to kick this back to Waiting for Code Reviews, as far as I can tell that requires you to be showing up in the UI below and you don't for some reason. If you wouldn't mind taking another look a this when you have a moment, I'd appreciate it! Also the button below continues to not work and I don't understand why 😞. |
|
Oh, I guess maybe it's because GitHub doesn't think your review counts due to the way this repository is set up 😛. In that case, though, @typescript-bot isn't providing a super accurate message. |
Thanks to @reubenrybnik for bringing this to my attention in DefinitelyTyped/DefinitelyTyped#46189 (comment)
|
Or maybe I just wasn't patient enough since it says it also reacts to comments and seems to have probably done so on a timer 😞 |
|
@reubenrybnik I've responded to your answers to my comments. Is that what you meant, or do you actually want me to go over the code again? |
|
Nope, that's all I was hoping for, thanks @jgonggrijp! I'll make the requested changes in a bit 😄 |
|
Actually, your comment #46189 (comment) happened at the same time as the status changes happened, which seems like an odd action to have potentially caused this behavior. 🤷 oh well, gonna stop thinking about it now. |
…, updating documentation, and adding tests for the stop + step parameter set.
|
@jgonggrijp Thank you for reviewing this PR! The author has pushed new commits since your last review. Could you take another look and submit a fresh review? |
|
Updated numbers for you here from 2b9a663. Comparison details 📊
Looks like there were a couple significant differences—take a look at worst-case duration for getting quick info at a position to make sure everything looks ok. |
|
I kind of want to do one more commit just to see if the Perf: Worse label goes away since both links for worst identifiers are pointing at code that I didn't touch in this PR at all. |
jgonggrijp
left a comment
There was a problem hiding this comment.
My approval is conditional on the answer to the question below being "yes".
Well done again!
|
Updated numbers for you here from 49c4278. Nice job, these numbers look better. Comparison details 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
…rather than testing just null or just undefined directly.
|
Updated numbers for you here from 207be20. Comparison details 📊
Looks like there were a couple significant differences—take a look at worst-case duration for getting quick info at a position to make sure everything looks ok. |
|
[sigh] @typescript-bot, your input is not consistent and I'm not sure what it indicates aside from that something may possibly get worse somewhere for someone somehow. Completions makes me think compiler maybe, and quick info makes me think maybe stuff like VS Intellisense? Also, I'm really surprised that dropping an overload in favor of optional parameters and adding Not saying that those aren't the results of those changes, just that it doesn't make sense to me and I don't feel like I'm provided enough information to understand the potential negative effects and take appropriate action here. |
jgonggrijp
left a comment
There was a problem hiding this comment.
Sorry for the delay. Let's ignore the performance tests and move on.
|
No worries, thanks @jgonggrijp! You've been impressively responsive so far during this process, definitely don't feel like you need to respond immediately all the time 😄. My concern earlier was more just around DT providing the correct general indictors for folks to more accurately be able to tell what PRs are ready for additional review, not about you specifically not getting back to me fast enough. I'm probably not going to completely ignore the performance results since I do think it would be nice to file an issue requesting some additional readme documentation on what those numbers mean from a practical, real-world perspective and what overall durations are getting into "bad" territory (either something concrete like "this is where compilation/IDEs start to seem really laggy" or something more abstract like a comparison to other similarly complex definitions), but I definitely don't feel like these results in particular are worth holding this process up for. |
|
On the other hand, I suppose if the numbers get concerning I can put the types in a solution and benchmark building or eyeball the speed of something like VS Intellisense. Since after poking about the internet I'm pretty sure |
|
Ready to merge |
|
I just published |
…rray Tests - Compact and Range by @reubenrybnik * Updating type definitions for compact and range and adding tests. * Adding a few multi-call chain tests. * Removing a test I already added in a previous PR. * Adding back support for null and undefined lists for compact. * Making the following updates to range: collapsing to single overloads, updating documentation, and adding tests for the stop + step parameter set. * Adding compact tests for a null collection as well. * Switching to a test that checks a List | null | undefined type union rather than testing just null or just undefined directly.




npm test.)npm run lint package-name(ortscif notslint.jsonis present).This PR continues the planned set that will together add up to #45201 and includes the following changes:
compactandrange.Truthyconditional type and updates allcompactfunctions to use it._Chain.compactand_Chain.rangeto use the correct wrapped value typeVto partially fix @types/underscore error TS2322 for_.chainafter upgrade to v1.9 #36308.