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

[flutter_tools] Generate correct entrypoint module name #49486

Merged
merged 6 commits into from Jan 28, 2020

Conversation

jonahwilliams
Copy link
Member

Description

Ensure that the bootstrap module is requested as packages/package-name/path instead of an absolute file path. Removes windows file-path workarounds from module mapping.

@fluttergithubbot fluttergithubbot added the tool Affects the "flutter" command-line tool. See also t: labels. label Jan 25, 2020
@@ -347,17 +341,20 @@ class WebDevFS implements DevFS {
'web',
'dart_stack_trace_mapper.js',
));
final String entrypoint = PackageUriMapper(mainPath, '.packages', null, null)
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this always a path under lib? What does PackageUriMapper do for files not under lib?

Copy link
Member Author

Choose a reason for hiding this comment

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

If it's not under lib, it returns null - so I'm falling back to mainPath. That ... kinda works, what does the frontend_server produce in this case?

Copy link
Contributor

@jakemac53 jakemac53 Jan 27, 2020

Choose a reason for hiding this comment

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

Frontend_server will fall back to either the multi-root or absolute file uri (multi-root takes precedence).

The problem is down below we do /packages/$entrypoint.lib.js which won't work with the absolute or multi root uris (you probably just want $entrypoint.lib.js in that case?).

Copy link
Member Author

Choose a reason for hiding this comment

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

Ahh yeah, I'd need to check for the whole thing being null. I'll update with some tests

@jmagman jmagman added this to Awaiting triage in Tools - web review via automation Jan 27, 2020
@jonahwilliams jonahwilliams moved this from Awaiting triage to Engineer reviewed in Tools - web review Jan 27, 2020
@jonahwilliams jonahwilliams merged commit ace2c22 into flutter:master Jan 28, 2020
@jonahwilliams jonahwilliams deleted the fix_fast_compiler branch January 28, 2020 01:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Tools - web review
  
Engineer reviewed
Development

Successfully merging this pull request may close these issues.

None yet

4 participants