collection icon indicating copy to clipboard operation
collection copied to clipboard

docs: Add a warning about dart-lang/sdk#43763 to sortedBy

Open eseidel opened this issue 2 years ago • 3 comments

dart-lang/sdk#43763 is supposedly hard to fix in the language, but is a common gotcha when dealing with sortedBy, so the least we can do is at least alert users and tell them how to work around it.

Fixes https://github.com/dart-lang/collection/issues/271.


  • [X] I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

eseidel avatar Oct 10 '23 15:10 eseidel

What it looks like:

image

eseidel avatar Oct 10 '23 15:10 eseidel

I would prefer if this was handled in a more centralized way. https://github.com/dart-lang/sdk/issues/43763#issuecomment-1756007200

If we can't accomplish this in the analyzer we could work on the phrasing here.

natebosch avatar Oct 10 '23 18:10 natebosch

I'm not at all wedded to this solution. Just witnessed myself and two other colleagues each independently (!) hit this error in the last few months and so went to document where it might be seen by others. I wasn't aware of https://github.com/dart-lang/sdk/issues/43763 until this morning (and managed to fumble my way to a solution in my code without finding it), but after reading https://github.com/dart-lang/sdk/issues/43763 and seeing it's supposedly a 10 year old issue with no easy fix, felt like documenting the failure to avoid others being confused by it could at least help. 🤷

eseidel avatar Oct 10 '23 23:10 eseidel

Closing as the dart-lang/collection repository is merged into the dart-lang/core monorepo. Please re-open this PR there!

mosuem avatar Oct 21 '24 07:10 mosuem