Skip to content

fix the example frontend server web app #1694

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 11 commits into from
Jul 25, 2022
Merged

Conversation

jakemac53
Copy link
Contributor

Fixes #1546

There are definitely some hacky-ish things here in terms of the routing, but it works and that isn't the focus of the example.

@jakemac53 jakemac53 requested a review from annagrin July 20, 2022 18:14
Copy link
Contributor

@annagrin annagrin left a comment

Choose a reason for hiding this comment

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

Thanks Jake! Is there an existing test that makes sure the example is working btw? If not, would it be possible to add it?

@jakemac53
Copy link
Contributor Author

I added some basic tests, also fixed an issue with the vm client example

@jakemac53
Copy link
Contributor Author

cc @johnniwinther do you have any insight into the error I am seeing? I can't repro it locally...

 [e] APP -> Unhandled exception:
  [e] APP -> 'org-dartlang-root:///example/app/main.dart': error: Unexpected tag 51 (AwaitExpression) in ::.main, expected expression
  [e] APP -> #0      _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
  [e] APP -> #1      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)

This is coming from an app that is spawned by a precompiled dill (from frontend server).

@jakemac53
Copy link
Contributor Author

For now I am just skipping the example vm client test, not sure why its failing on github actions.

@johnniwinther
Copy link
Member

It looks like a new VM ast (where AwaitExpression is supported) is run on an older VM (where AwaitExpression wasn't supported). I don't know have that can happen, though.

@alexmarkov Do you have any idea how this can happen?

@alexmarkov
Copy link

@johnniwinther Yes, this looks like an incompatibility between kernel binary (probably because the new front-end server is used in the tests) and the old Dart VM. We do not have any compatibility guarantees, which means that versions of front-end server and Dart VM should match exactly (should come from the same commit). These tests seem to violate this requirement.

@jakemac53
Copy link
Contributor Author

I am not sure how these could be different versions... there is only one version of the Dart SDK downloaded in the job...

@alexmarkov
Copy link

It looks like the test doesn't perform any cleanup before/after running and doesn't check for errors.
Maybe front-end server compilation fails and test attempts to run stale and incompatible dill file .dart_tool/out/example_app.dill.

@jakemac53
Copy link
Contributor Author

It looks like the test doesn't perform any cleanup before/after running and doesn't check for errors.
Maybe front-end server compilation fails and test attempts to run stale and incompatible dill file .dart_tool/out/example_app.dill.

I tried adding some cleanup to the examples themselves, we can see if that gives a different error. I didn't see any errors in the compile output though.

@jakemac53
Copy link
Contributor Author

@alexmarkov thanks that did seem to fix it! I am not sure exactly what was happening still... each test should have overwritten the existing files from the previous test? Maybe frontend_server was appending instead?

@jakemac53
Copy link
Contributor Author

Actually I wonder if it was picking up the previous dill file and doing an "incremental" compile or something, but from a dill compiled for the wrong platform?

@jakemac53 jakemac53 requested a review from annagrin July 22, 2022 15:32
Copy link
Contributor

@annagrin annagrin left a comment

Choose a reason for hiding this comment

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

LGTM!

@jakemac53 jakemac53 merged commit 0f154df into master Jul 25, 2022
@jakemac53 jakemac53 deleted the web-client-example-fixes branch July 25, 2022 19:06
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.

DartDevcFrontendServerClient throws null safety exception
4 participants