Skip to content

Add appSizeBase and appSizeTest args to the devtools server #2546

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

Merged
merged 2 commits into from
Dec 10, 2020

Conversation

kenzieschmoll
Copy link
Member

This will allow specifying appSizeBase and appSizeTest file paths as args to the server (e.g. --appSizeBase old.json --appSizeTest new.json)

// not be specified (it should only be present for diffs). If [appSizeTest]
// is present without [appSizeBase], we will ignore the parameter.
if (appSizeBase != null) {
final startQueryParamIndex = url.indexOf('?');
Copy link
Contributor

Choose a reason for hiding this comment

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

use uri parsing instead of indexof

Copy link
Member Author

Choose a reason for hiding this comment

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

when I tried to add /#/appsize using Uri.replace(path: '/#/appsize), the # is encoded and the url does load properly.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you want to use fragment to change the fragment property rather than path.
https://api.dart.dev/stable/2.10.4/dart-core/Uri/fragment.html

Copy link
Member Author

Choose a reason for hiding this comment

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

this also doesn't work because the fragment is after the query parameters (http://127.0.0.1:9102?appSizeBase=old.json&appSizeTest=new.json#appsize), and devtools expects the fragment id to be before the query parameters (http://127.0.0.1:9102/#/appsize?appSizeBase=old.json&appSizeTest=new.json)

Copy link
Contributor

Choose a reason for hiding this comment

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

where in devtools are we requiring the fragment to be before the query parameters? that seems like a bug.

Copy link
Member Author

Choose a reason for hiding this comment

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

see #2475 for some input from danny

Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

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

lgtm

@kenzieschmoll kenzieschmoll merged commit 313fa13 into flutter:master Dec 10, 2020
@kenzieschmoll kenzieschmoll deleted the appsize branch December 10, 2020 19:47
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.

2 participants