-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[go_router] Add support for Iterable, List and Set to TypedGoRoute #2698
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
[go_router] Add support for Iterable, List and Set to TypedGoRoute #2698
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
@chunhtai From triage: ping on this review. |
|
Updates: this one is waiting on #2679 |
chunhtai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
075757d to
b68fa74
Compare
|
Hi @Skogsfrae looks like there are ci failures and merge conflict. can you rebase off the latest main and fix the ci? |
aa84861 to
173e37a
Compare
|
Hi @chunhtai I finally managed to make the ci work. I temporarily modified the |
analysis_options.yaml
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not be turning off analysis for an entire directory. What problem is this intended to solve?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@stuartmorgan This pr changes the signature of a go_router method used in .g.dart generated files and causing problems in cyrrus ci analysis step when running the analyser for go_router_builder/example app.
Talking about that on discord, @chunhtai told me to temporarily disable the analysis for that example app so this pr can be merged and then reenable it in #2679
I first tried to disable the analysis only on those specific files, but then I faced another problem for updating a file of a library without increasing its version, so I had to revert it.
This are the cyrrus ci logs:
https://cirrus-ci.com/task/4546239256592384
https://cirrus-ci.com/task/6292642485501952
Running command: "dart analyze --fatal-infos" in /tmp/cirrus-ci-build/packages/go_router_builder
Analyzing go_router_builder...
info - example/lib/all_types.g.dart:205:61 - Unnecessary null checks. - unnecessary_null_checks
info - example/lib/all_types.g.dart:226:60 - Unnecessary null checks. - unnecessary_null_checks
info - example/lib/all_types.g.dart:244:63 - Unnecessary null checks. - unnecessary_null_checks
info - example/lib/main.g.dart:122:54 - Unnecessary null checks. - unnecessary_null_checks
4 issues found.
if [[ $CIRRUS_PR == "" ]]; then
./script/tool_runner.sh version-check --ignore-platform-interface-breaks
else
./script/tool_runner.sh version-check --check-for-missing-changes --pr-labels="$CIRRUS_PR_LABELS"
fi
Running for all packages that have diffs relative to "fdf708371f2e33f44189ebc43d896679b7ebf463"
Changed packages: go_router,go_router_builder
�[36m[0:00] Running for go_router...�[0m
5.2.0 -> 5.2.1
�[36m[0:00] Running for go_router_builder...�[0m
No version change.
�[31mNo CHANGELOG change found. If this PR needs an exemption from the standard policy of listing all changes in the CHANGELOG, comment in the PR to explain why the PR is exempt, and add (or ask your reviewer to add) the "override: no changelog needed" label. Otherwise, please add a NEXT entry in the CHANGELOG as described in the contributing guide.�[0m
�[31mThe following packages had errors:�[0m
�[31m go_router_builder:
Missing CHANGELOG change�[0m
�[31mSee above for full details.�[0m
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
then I faced another problem for updating a file of a library without increasing its version, so I had to revert it.
The second failure you linked to is only for not having a CHANGELOG entry, not lack of version update, and as the error message says that's trivially overridable when it makes sense to do so (as in this case). Local ignores and an override for the changelog would be much better than changing the root analysis configuration to opt everything out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for that, I genuinely thought it was a versioning problem.
I fixed the pr, can you add the override: no changelog needed label? I can't do it
|
If someone can please add the |
|
Overriding for |
3217a65 to
691a372
Compare
|
@chunhtai this is ready to be merged |
|
@johnpryan Who should do the second review on this? |
|
@chunhtai It looks like you reviewed this before, could you re-review as the second reviewer? |
chunhtai
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
@Skogsfrae can you rebase off latest main? |
691a372 to
262df99
Compare
|
@chunhtai I rebased both this pr and the one on go_router_builder |
28e55cd to
eacf2f2
Compare
|
@chunhtai I just rebased it again with the last release. Is there something else that needs to be done to merge this PR? |
…lder code generator" This reverts commit 6ae5026c0df976c6003b1e4aee10ed95c6601783.
This reverts commit 48bdeb5abba23847e90ec0ba3c788b279e87eddb.
eacf2f2 to
fc79f9c
Compare
|
@chunhtai @stuartmorgan @johnpryan can this PR be merged so I can update the linked one and hopefully have that merged too? Thank you guys 🙏🏼 |
|
Based on the last comments from reviewers it looks like this is ready to land and just didn't get the label. |
Add support for Iterable, List and Set to TypedGoRoute
Changed signature of
GoRouteData.$locationfor PR #2679Resolves Issue #108437
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the [pub versioning philosophy], or this PR is [exempt from version changes].CHANGELOG.mdto add a description of the change, [following repository CHANGELOG style].///).