-
Notifications
You must be signed in to change notification settings - Fork 306
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
Fix DevTools extensions not being resolved when app's Dart entrypoint is located in integration_test
directory
#6644
Fix DevTools extensions not being resolved when app's Dart entrypoint is located in integration_test
directory
#6644
Conversation
… is integration_test/*.dart
This is a temporary workaround for flutter/devtools#6644
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.
LGTM, thanks for bringing this issue to our attention. Before the next release of DevTools, I'm going to try to fix this for all cases (including integration_test) by addressing the TODO in this method:
// TODO(kenz): for robustness, consider sending the root library uri to the
// server and having the server look for the package folder that contains the
// `.dart_tool` directory.
Thanks for quick review @kenzieschmoll. I fixed code formatting, should be good now. |
final libDirectoryRegExp = RegExp(r'\/lib\/[^\/.]*.dart'); | ||
final libDirectoryIndex = fileUri.indexOf(libDirectoryRegExp); | ||
final integrationTestDirectoryRegExp = | ||
RegExp(r'\/integration_test\/[^\/.]*.dart'); | ||
final integrationTestDirectoryIndex = | ||
fileUri.indexOf(integrationTestDirectoryRegExp); |
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.
Maybe this could be a single regex, something like:
RegExp(r'\/(lib|integration_test|test|bin)\/[^\/.]*.dart');
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.
let's see - I pushed the changes
You'll need to merge master to get this to pass the tests. Also, can you add an entry to NEXT_RELEASE_NOTES.md in the General section?
|
Thanks - done! |
… is located in `integration_test` directory (#6644)
I'm developing a DevTools extension that's meant to be used during integration testing. That's why our app's entrypoint is
integration_test/test_bundle.dart
, notlib/main.dart
or similar.Unfortunately, when the app is started with
integration_test/*.dart
entrypoint, no DevTools extensions were loaded and we were seeing the following errors:List which issues are fixed by this PR.
I wrote about this issue on Flutter team's Discord (link).
Pre-launch Checklist
///
).If you need help, consider asking for help on Discord.