Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

eseidel
Copy link

@eseidel eseidel commented Oct 10, 2023

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 #271.


  • 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
Copy link
Author

eseidel commented Oct 10, 2023

What it looks like:

image

Copy link
Member

@devoncarew devoncarew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! Can you add an entry in the changelog for this?

@natebosch or @lrhn - can you review?

@natebosch
Copy link
Member

I would prefer if this was handled in a more centralized way. dart-lang/sdk#43763 (comment)

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

@eseidel
Copy link
Author

eseidel commented Oct 10, 2023

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 dart-lang/sdk#43763 until this morning (and managed to fumble my way to a solution in my code without finding it), but after reading dart-lang/sdk#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. 🤷

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IterableExtension sortedBy doesn't permit sorting by int without workaround
3 participants