Skip to content

Remove extra leading slashes in the flutter tool snapshot path - #7291

Merged
jason-simmons merged 1 commit into
flutter:masterfrom
jason-simmons:bug_7279
Dec 19, 2016
Merged

jason-simmons merged 1 commit into
flutter:masterfrom
jason-simmons:bug_7279

Conversation

@jason-simmons

Copy link
Copy Markdown
Member

Dart will parse this path as a URI, and multiple leading slashes will cause
that part of the path to be parsed as an authority.

Fixes #7279

Also see dart-lang/sdk#28143

Dart will parse this path as a URI, and multiple leading slashes will cause
that part of the path to be parsed as an authority.

Fixes flutter#7279

Also see dart-lang/sdk#28143
@Hixie

Hixie commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

Won't this break on Windows where you can have UNC paths with two leading slashes?

@Hixie

Hixie commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

I guess I don't understand where the multiple slashes are coming from. It seems like fixing the source would be the more correct fix.

@Hixie

Hixie commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

I see, on Unix // is a valid string at the start of a path.

@Hixie

Hixie commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

LGTM

@Hixie

Hixie commented Dec 19, 2016

Copy link
Copy Markdown
Contributor

Do we have a testing story for this script? I guess not...

@eseidelGoogle

Copy link
Copy Markdown
Contributor

Is this just a temporary workaround until the dart vm handles //path/to/thing.dart correctly?

@jason-simmons

Copy link
Copy Markdown
Member Author

It's not clear what the intent of the Dart command line tool is. Currently the tool is assuming that the dart-script-file argument is a URI, thus making //path/to/thing.dart invalid.

If Dart intends to treat dart-script-file as a filesystem path, then the tool would need to convert //path/to/thing.dart into a valid URI.

More info at dart-lang/sdk#28143

@jason-simmons
jason-simmons merged commit 82fc87f into flutter:master Dec 19, 2016
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

vm-service crashes if path to flutter starts with two slashes (/)

4 participants