Skip to content

Fix starting the daemon client on Windows #110

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 1 commit into from
Jan 31, 2019
Merged

Fix starting the daemon client on Windows #110

merged 1 commit into from
Jan 31, 2019

Conversation

grouma
Copy link
Member

@grouma grouma commented Jan 31, 2019

When starting a pub.bat process with mode ProcessStartMode.detachedWithStdio the corresponding process will start a detached window (regardless of the runInShell option) that does not forward STDIO. The daemon client expects ready signals on STDIO and thus must work around this limitation by starting the pub snapshot directly.

This work around is still somewhat clunky on Windows. The daemon process spawns multiple persistent workers that create a blank cmd window. If these windows are closed they will reopen upon build. Further windows will not open if one already exists. Even with this oddity I believe this is a preferable alternative to dart-lang/build#2009.

I'll need to investigate further but the root cause of this oddity is likely within pub or the SDK.

This is a workaround for dart-lang/sdk#35809

Closes #102

@grouma grouma requested review from kevmoo and jakemac53 January 31, 2019 01:33
@grouma grouma changed the title Fix starting the client on Windows Fix starting the daemon client on Windows Jan 31, 2019
@grouma grouma merged commit 593a6e9 into master Jan 31, 2019
@grouma grouma deleted the pub-window-fix branch January 31, 2019 04:30
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.

Enable serve2 integration tests on Windows
2 participants