[go_router_builder] Fixes incorrect separator at location path on Windows.#1690
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
left a comment
There was a problem hiding this comment.
it looks like the change log is out of date, can you rebase off the main branch and fix the conflict?
The change makes sense, but we need a test in order to merge this pr. Can you write a example that cover this use case in example/ folder?
…void using \ as separator of route path on Windows
1b1e5cf to
467db94
Compare
|
I rebased it and pushed it. The main.dart in example already covers this. These line is included as a reproducible example in flutter/flutter#102710. packages/packages/go_router_builder/example/lib/main.dart Lines 65 to 80 in 2c9dbda |
but the file main.g.dart does not change after this change. is it needed to be run in windows host? |
Yes, and to see generated result you have to re-generate main.g.dart with |
|
sounds good, I am working on another pr to run test on windows platform, so test wise, this pr should be good based on the CI �[31mThe following packages had errors:�[0m you need to bump the package version. |
Co-authored-by: Kevin Moore <[email protected]>
The
go_router_builderis usingpath.joinAllto concatrouteand createlocation, but it uses backslash as path separators on Windows.This PR will replace that with
path.url.joinAll, which uses slash. The builder will be able to generate slash-separated location on Windows, same on the other platforms.I didn't know how to write test in this case. The build runner will generate correct
main.g.dartin example project on Windows.This PR will fix flutter/flutter#102710.
No changes in
flutter/testsPre-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.///).If you need help, consider asking for advice on the #hackers-new channel on Discord.