{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/30119","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/30119/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/30119/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/30119/events","html_url":"https://github.com/dart-lang/sdk/issues/30119","id":241564023,"number":30119,"title":"[Regression?] VM's behavior of stdin/out/sink changes in 1.25.0?","user":{"login":"matanlurey","id":168174,"avatar_url":"https://avatars1.githubusercontent.com/u/168174?v=3","gravatar_id":"","url":"https://api.github.com/users/matanlurey","html_url":"https://github.com/matanlurey","followers_url":"https://api.github.com/users/matanlurey/followers","following_url":"https://api.github.com/users/matanlurey/following{/other_user}","gists_url":"https://api.github.com/users/matanlurey/gists{/gist_id}","starred_url":"https://api.github.com/users/matanlurey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matanlurey/subscriptions","organizations_url":"https://api.github.com/users/matanlurey/orgs","repos_url":"https://api.github.com/users/matanlurey/repos","events_url":"https://api.github.com/users/matanlurey/events{/privacy}","received_events_url":"https://api.github.com/users/matanlurey/received_events","type":"User","site_admin":false},"labels":[{"id":219928175,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-language","name":"area-language","color":"c7def8","default":false},{"id":219928199,"url":"https://api.github.com/repos/dart-lang/sdk/labels/library-io","name":"library-io","color":"d4c5f9","default":false},{"id":334529063,"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type:%20bug","name":"Type: bug","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-07-09T22:16:27Z","updated_at":"2017-07-10T07:37:48Z","closed_at":null,"body":"I don't see anything documented in https://github.com/dart-lang/sdk/blob/master/CHANGELOG.md.\r\n\r\nBut a test fails @ `1.25.0-dev.4.0` [on travis](https://travis-ci.org/dart-lang/io/jobs/251815068):\r\n\r\n```\r\ntest/process_manager_test.dart: spawn should forward stdin to another process [E]     \r\n  Expected: [\r\n              'You said: Ping',\r\n              '\\n'\r\n                ''\r\n            ]\r\n    Actual: [\r\n              'You said: Ping\\n'\r\n                ''\r\n            ]\r\n     Which: was 'You said: Ping\\n'\r\n              '' instead of 'You said: Ping' at location [0]\r\n```\r\n\r\nIn `1.24.0` (stable) both travis and locally I get `['You said: Ping', '\\n']` from the following:\r\n\r\n```dart\r\nfinal spawn = await processManager.spawn(\r\n  'dart',\r\n  arguments: [p.join('test', '_files', 'stdin_echo.dart')],\r\n);\r\nspawn.stdin.writeln('Ping');\r\nawait spawn.exitCode;\r\nexpect(stdoutLog, ['You said: Ping', '\\n']);\r\n```\r\n\r\nHere is the source of `stdin_echo.dart`:\r\n\r\n```dart\r\nimport 'dart:io';\r\n\r\nvoid main() => stdout.writeln('You said: ${stdin.readLineSync()}');\r\n```\r\n\r\nYou can reproduce via `pub run test` at the following commit: https://github.com/dart-lang/io/commit/7107db5e093af206a23688abb8f8fbc830032351\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/314028991","html_url":"https://github.com/dart-lang/sdk/issues/30119#issuecomment-314028991","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/30119","id":314028991,"user":{"login":"lrhn","id":4865287,"avatar_url":"https://avatars0.githubusercontent.com/u/4865287?v=3","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false},"created_at":"2017-07-10T07:37:48Z","updated_at":"2017-07-10T07:37:48Z","body":"This doesn't look like behavior that we want to promise one way or the other.\r\n\r\nCalling `spawn.stdin.writeln('Ping')` will send \"Ping\" followed by a newline. Whether that is sent or received as a single message or two (or five individual characters) is completely implementation dependent, and likely affected by the platform and the timing as well – even if the message and the newline are sent individually, if the receiver doesn't poll stdin before both are sent, it will likely see all the characters, the process communication is character based, not message based.\r\n\r\nSo this can be due to any number of inconsequential changes, and the test is being overly specific about what result it expects.\r\n\r\n"}}
{"actor":{"display_login":"lrhn"}}