-
Notifications
You must be signed in to change notification settings - Fork 83
Move chrome profile to .dart_tools #316
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
Conversation
webdev/lib/src/serve/chrome.dart
Outdated
@@ -62,7 +63,9 @@ class Chrome { | |||
/// | |||
/// Each url in [urls] will be loaded in a separate tab. | |||
static Future<Chrome> start(List<String> urls, {int port}) async { | |||
var dataDir = Directory.systemTemp.createTempSync(); | |||
var dataDir = Directory.fromUri(Uri.parse(p.joinAll( |
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 reason you can't just do Directory(p.join('.dart_tool', 'webdev', 'chrome_profile'))
?
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.
Discussed offline. This suggestion is safe under Windows so I'll change.
@@ -62,7 +63,9 @@ class Chrome { | |||
/// | |||
/// Each url in [urls] will be loaded in a separate tab. | |||
static Future<Chrome> start(List<String> urls, {int port}) async { | |||
var dataDir = Directory.systemTemp.createTempSync(); | |||
var dataDir = Directory(p.joinAll( | |||
[Directory.current.path, '.dart_tool', 'webdev', 'chrome_profile'])) |
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.
Have we already made some guarantee that cwd
is the package root?
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.
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.
NICE!
- As suggested by the Chrome docs, always use a tmp dir when passing `--remote-debugging-port` - Add graceful exit handler for daemon command - This ensures that Chrome is properly closed - Temporary pin build_daemon version to fix integration tests - Fix concurrent modification issue Closes #319 Closes #300 This reverts #322 & #316
Closes #297