[@types/parse] TestCollection generic argument fix for changes to Underscore#45748
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": 45748,
"author": "reubenrybnik",
"owners": [
"ullisenmedia",
"dpoetzsch",
"jaeggerr",
"flavionegrao",
"wesleygrimes",
"owsas",
"agoldis",
"AlexandreHetu",
"dplewis",
"yomybaby",
"pocketcolin",
"rdhelms",
"jlnquere",
"yagotome",
"tybi",
"RaschidJFR",
"jeffgukang",
"buitanloc",
"LinusU",
"REPTILEHAUS",
"JeromeDeLeon",
"kentrh",
"L3K0V"
],
"dangerLevel": "ScopedAndTested",
"headCommitAbbrOid": "14f599c",
"headCommitOid": "14f599c08e10a207c5e33598dfc4867fd96ceb1a",
"mergeIsRequested": true,
"stalenessInDays": 2,
"lastCommitDate": "2020-06-27T20:03:56.000Z",
"lastCommentDate": "2020-06-30T16:29:04.000Z",
"reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/45748/files",
"hasMergeConflict": false,
"authorIsOwner": false,
"isFirstContribution": false,
"popularityLevel": "Well-liked by everyone",
"anyPackageIsNew": false,
"packages": [
"parse"
],
"files": [
{
"filePath": "types/parse/v1/parse-tests.ts",
"kind": "test",
"package": "parse"
}
],
"hasDismissedReview": false,
"ciResult": "pass",
"lastReviewDate": "2020-06-30T12:30:57.000Z",
"reviewersWithStaleReviews": [],
"approvalFlags": 2,
"isChangesRequested": false
} |
|
🔔 @ullisenmedia @dpoetzsch @jaeggerr @flavionegrao @wesleygrimes @owsas @agoldis @AlexandreHetu @dplewis @yomybaby @pocketcolin @rdhelms @jlnquere @yagotome @tybi @RaschidJFR @JeffGuKang @buitanloc @LinusU @REPTILEHAUS @JeromeDeLeon @kentrh @L3K0V - please review this PR in the next few days. Be sure to explicitly select |
|
Sorry, it would probably be helpful to provide the error that occurs when running tests. |
|
👋 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. |
| } | ||
|
|
||
| class TestCollection extends Parse.Collection<Object> { | ||
| class TestCollection extends Parse.Collection<Parse.Object> { |
There was a problem hiding this comment.
Looking at where this is being used a bit more and trying this potential change out, it looks like this generic could also be updated to more specifically reference the Game test class instead if that would be preferable. If I were to do that, I'd probably also update the constructor to take Games as well.
|
Hi @reubenrybnik thanks for the heads up. I'm currently testing your commit 8adf160 (the one just before the parse update) and I see no issues on running So I think it's best that you revert changes made to the parse package. I'm not sure why the tests are failing on your end, does that happen when you get a fresh checkout of |
|
Hello @RaschidJFR, thanks for taking a look at this! It looks to me like 8adf160 is the commit just after the parse test update commit 1955fc1 instead of the one before it, which I believe is afe1393, so that might be why you had trouble replicating this. To better demonstrate this issue, I reverted 1955fc1, opened #45763, waited for the CI check for the PR to fail with the error I mentioned, and converted it to a draft to keep it off the board for the moment, which is admittedly something I should have probably considered doing before opening this PR to provide more concrete context for the issue. Let me know if that addresses your concerns around this change seeming like it might not be necessary. It's probably also worth noting that per common mistakes, "Using the types |
|
@reubenrybnik I think maybe this feels like a particularly strange error on our end because that whole So I guess my suggestion is to just go ahead and delete that whole |
|
Thanks for looking into this in such depth @rdhelms, I appreciate it! I'd be happy to delete that folder instead if that would be the preferred fix, but if it's ok with you I'd prefer to close this PR and open a new one with those changes instead of making those changes on this branch. |
|
Too, while I'm happy to do so I don't need to be the one to open the new PR if one of the Parse contributors would prefer to make this change themselves. |
|
I agree with @rdhelms , let's remove the folder. @reubenrybnik I think the easiest path is just deleting de folder in a new commit on this same PR. Maybe update the title, but I don't think it's necessary to create a new one. Just make the changes and we'll approve it so you can continue with your other PR in underscore. |
|
Hmm, unfortunately @RaschidJFR and @rdhelms deleting the contents of this folder does not make Regrettably this error doesn't provide context about what package it was looking into when it failed. Looking through the code in the stack trace I was able to piece together that it checks for dependent packages using I was ok with doing a simple delete, but I'm worried that dealing with that dependency may require some significant work, and if so I would rather not be the one to do it. If there are any further simple actions you think it is reasonable for me to take here, let me know and I'll be happy to take them, but otherwise it would be nice to get this PR approved in its current state since it's a very small, seemingly reasonable, and most likely correct change to make that will more quickly unblock my ongoing efforts with Underscore's definitions. |
|
Pfff what a mess... the interdependency looks like a growing issue as it implies extra work for one developer to fix external issues in unfamiliar packages. I think that's an issue for the DefinitelyTyped team to sort, I'm seeing that there are a few discussions going on. So I guess removing folder So to sum up: is there any other way that you go ahead without modifying Opinions @rdhelms ? |
|
It does seem like it should ideally be possible to reference specific versions of types rather than needing to keep everything up-to-date with everything else @RaschidJFR, but I'm not sure if DT provides such a mechanism at this time. I can double-check, though. If it's any consolation, this only affects test code and as I previously noted this change would probably be good to make even if #45763 didn't depend on it since |
|
Ha, I feel like a silly person, I went searching for how to do this for a while when I'm literally making changes right now to a forked previous version of definitions. @RaschidJFR, I suppose a potential way to possibly deal with this that would still change parse but most likely only once more would be to create a folder in Underscore like Too, I do still maintain that this would be an appropriate change to make even if it wasn't needed for anything else, so if this seems like a headache it could possibly be one that gets postponed until later (where later may possibly be never if you do end up removing |
|
Regrettably documentation for maintaining old versions isn't 100% clear on the major-version-only question, but if I had to judge just from reading it I'd say that this strategy is only for use with major versions, which as I mentioned will not work well with Underscore since it's still on v1. |
|
In the short term, I think it makes sense to just go ahead and merge this current PR @reubenrybnik - you're right that the change you're making is "better than it was," and in light of our entanglement with In the medium term, I think we should coordinate with @dpoetzsch to remove |
|
@reubenrybnik Everything looks good here. Great job! I am ready to merge this PR on your behalf. If you'd like that to happen, please post a comment saying:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ |
|
Sounds good, thank you very much for your time @rdhelms and @RaschidJFR! Sorry this didn't end up being the most optimal solution from the perspective of @RaschidJFR, since it looks like you 👍'd the approval from @rdhelms I'm going to merge this an hour from now unless you ask me not to. |
|
Ready to merge |
…c argument fix for changes to Underscore by @reubenrybnik
…c argument fix for changes to Underscore by @reubenrybnik



npm test.)npm run lint package-name(ortscif notslint.jsonis present).underscore-tests-map-pluck-filter-groupBy-flatten branch diff[@types/underscore] Collection and Array Tests - Map, Pluck, Filter, GroupBy, and Flatten #45763Hello Parse folks! I'm working on writing tests for Underscore and updating definitions that don't pass those tests, and I ran into a minor issue with my next iteration of changes here where a Parse test becomes unhappy. The small change in this PR fixes the unhappiness, and while it seems reasonable to me in context I'm admittedly not 100% sure that it is correct.
I'd prefer to make this change in its own separate PR because it's a very small change that seems reasonable to make on its own and I'm trying not to waste DT maintainer time if I can help it since PRs that edit multiple packages at once require maintainer review. However, if anyone feels that it would be better to not make this change in a separate PR or if I don't receive any response within a week, I will close this PR and include this change in the PR for the referenced Underscore changes instead.
Thank you very much for your time!