Skip to content

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

Merged
merged 3 commits into from
Apr 22, 2019
Merged

Move chrome profile to .dart_tools #316

merged 3 commits into from
Apr 22, 2019

Conversation

grouma
Copy link
Member

@grouma grouma commented Apr 22, 2019

Closes #297

@grouma grouma requested a review from jakemac53 April 22, 2019 16:47
@@ -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(
Copy link
Contributor

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'))?

Copy link
Member Author

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.

@grouma grouma merged commit 918cb75 into master Apr 22, 2019
@grouma grouma deleted the data-dir branch April 22, 2019 17:54
@@ -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']))
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

NICE!

@grouma grouma mentioned this pull request Apr 26, 2019
grouma added a commit that referenced this pull request Apr 26, 2019
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

using --user-data-dir= with a temp dir means that the window position is not restored
4 participants