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
isolate/illegal_msg_test fails on dart2js #6750
Comments
I'm not sure we have to fix this in M2, but it would be good to know what this is about. Nicolas, would you mind investigating? Set owner to ngeoffray@google.com. |
This comment was originally written by ngeoffray@google.com The test is apparently checking that we get a synchronous exception when sending an invalid message to an SendPort. However I cannot see anywhere in the documentation that this is the intended behavior. What dart2js is asynchronously checking if the message is valid. Siva, should the test be rewritten in an asynchronous way, or is there a specification for the send to throw synchronously? |
The current isolate API documents send as follows: void send(var message, [SendPort replyTo]); The API does not return a future to be able to re-write the test in I think when the API was designed we thought no errors would be reported as Kasper was always of the opinion that we asynchronously send a message and hope it reaches the other end. If it doesn't the program deals with it as part of it's logic. But now we have this requirement that we need to throw ArgumentError when we have |
This comment was originally written by ngeoffray@google.com Thanks for the explanation Siva. Adding Florian and Kasper to the discussion. cc @kasperl. |
We discussed this here in the library team. We have a good plan on how to tackle this when we switch to isolate streams. We will probably require to serialize synchronously as otherwise error-handling just becomes too hard. cc @lrhn. |
In reply to comment 5: It is not the error handling that is too hard, but really the semantics need to be valid. Once you sent an object, you are free to modify it locally. If the state is not captured synchronously at the time of the send, you will end with lots of pain. |
good point. |
Would this be better categorized as a library issue? Feel free to throw it back in the dart2js bucket if you feel that is better, Florian. Removed Area-Dart2JS label. |
Added Library-Isolate label. |
Removed Library-Isolates label. |
Set owner to @lrhn. |
Removed this from the 1.6 milestone. |
Removed Oldschool-Milestone-1.6 label. |
FAILED: dart2js-d8 release_ia32 isolate/illegal_msg_test
Expected: pass
Actual: fail
stdout:
test.dart: Compilation finished (step 1 of 2)
/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:2216: Expect.isTrue(false) fails.$.$ $throw (/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:2211:13)
throw jsError;
^
Expect.isTrue(false) fails.
at
at $.Expect__fail (/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:2338:11)
at $.Expect_isTrue (/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:2324:5)
at Function.$.main (/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:3121:5)
at _IsolateContext.$$._IsolateContext.eval$1 (/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:1005:19)
at $.startRootIsolate (/mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:3171:15)
at /mnt/data/b/build/slave/dart2js-linux-release-4-5/build/dart/out/ReleaseIA32/generated_tests/dart2js-d8/tests_isolate_illegal_msg_test/out.js:3818:7
The text was updated successfully, but these errors were encountered: