Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Load extensions from DevTools server instead of using stubs. #6097
Load extensions from DevTools server instead of using stubs. #6097
Changes from 1 commit
c30a7f6
8b13cb2
f9a46b1
96cf7f9
2f6dc69
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
What happens if the root library isn't
main.dart
? There's no requirement for the entry point of a Dart or Flutter program to be inmain.dart
. I'm not even sure there's a requirement for it to be in a library of the formlib/<script>
for Flutter, but there definitely isn't for Dart programs.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.
Is there a convention for finding the root directory that contains the
.dart_tool
folder? Is this guaranteed to always be the parent oflib/
?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.
I'm not sure, especially if you don't have access to the FS. If you did, you'd just walk the directory chain until you found the directory containing
.dart_tool
.I think you're probably safe to assume that the entrypoint is under
lib/
, so if you update this tofileUri.endsWith(RegExp(r'\/lib\/[^\/.]*.dart'))
this should work the vast majority of the time.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.
Optionally, I could just pass the whole root library to the server and have the server look for the .dart_tool folder?
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.
That'd be the most accurate way of handling it.
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.
Used the regexp for now but added a todo to move this logic to the server.