-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Uri library strong mode issue #31534
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
Comments
To give you some context, I ran into this issue when attempting to execute (and write tests for) the server samples in the Write HTTP Clients & Servers tutorial. |
Thanks, @chalin ! |
@chalin Compare:
|
So, essentially, there is no way to run Dart in strong mode on the VM at the moment? Could we keep this issue open until there is a way to run dart with the CFE? |
You cannot run existing Dart code with the strong mode type system and no inference. It simply will not work. (I tried too, starting with the To run strong mode on the VM, you need to use the kernel compiler for it, to generate code that has the correct inferred types. There won't be a way to run strong mode directly on the VM, all strong mode code will have to be compiled by the common front-end. If we need a script to kernel-compile and VM-run strong mode Dart scripts, we should have a separate issue for that. |
Here it is #31544. |
Couldn't we just fix this by adding the type – to unblock @chalin ? |
Adding the missing |
If we can't run strong mode on the VM, it might be a good idea to drop the WDYT? |
I am going to make |
Great, thanks. Here is the issue to track that, #31561, along with the extra request to make |
Execute:
under Dart 2.0.0-dev.8.0 strong mode results in a runtime error:
The cause of the problem seems to be missing generic type parameters on some static const like this from
core/uri.dart
:This was fixed by 757d806, but that PR seems to have missed two declarations:
static const _pathCharOrSlashTable
static const _queryCharTable
which will probably need to be declared as
const <int>[...]
too.cc @kwalrath @kevmoo @lrhn @leafpetersen
The text was updated successfully, but these errors were encountered: