-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Cannot use pub
with --preview-dart-2
#32188
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
in the dart sdk builds pub, analyzer, dart2js and ddc use an application snapshot to run, these snapshots are built in dart 1 mode. When preview-dart-2 is specified it is not compatible with these snapshots and hence the failure. The error message is not very helpful and we will fix that. To get these command with --preview-dart-2 first the pub, dart2js, analyzer code needs to be made strong mode clean and these application snapshots need to be generated with that option turned on. I think we planned to do this in Q2. The issue that the original bug wanted addressed was a way for folks to run tests in preview-dart-2 mode using pub. For this to work 'pub run' needs to implement the --preview-dart-2 option so that it starts the test process using this option, somewhat similar to the '-c' or '--checked' option that it currently supports. sivalinuxmach[sdk]>out/ReleaseX64/dart-sdk/bin/pub run --help Usage: pub run [args...] |
Who needs to own this issue of implementing the option '--preview-dart-2' in 'pub run' ? |
We have no plans, or bandwidth, to work on pub client in q1. |
@nex3 @grouma @natebosch Can you all figure out what's needed here? |
/cc @kmillikin - there are likely changes need to CFE to make it run on Dart 2. |
FYI, I was able to locally run DDC and DDK with
I haven't figured out how to build the DDC snapshots yet with |
Once dart-lang/pub#1871 lands, we won't need dart2js or DDC to be Dart 2-compatible anymore. We do still use the analyzer, though—is that Dart 2-clean? |
There is at least one (external) method in dart:io that isn't, but all of the tests that don't rely on IO (which is the vast majority of them) pass. So, as far as I can tell based on our tests, yes, analyzer is Dart 2 clean. I'm sure we'll find a few bugs in code that isn't covered by tests. |
I'll work on checking that I'll likely need some help getting it set up in the |
Is If not, we can get part of the way by spawning the |
However it's drastically slower. Set up a package which has a single dependency: dependencies:
pub:
path: ../pub Invoke pub with no arguments - just prints usage and exits.
It's possible that using a snapshot in Dart 2 semantics will be an improvement, and that this will carry over when using a hosted dependency rather than a path dependency... |
I can't get timing data with snapshots - #32911 |
Here is the list of work that I think is blocking the end to end
|
Given that the running from source is so slow with the CFE right now, how do we verify that a given chunk of code is in fact Dart 2-clean? |
@a-siva - note Nate's Dart 1 vs Dart 2 perf comment above. |
This continues to cause friction when we work on making packages dart2 compatible. @a-siva is someone looking into the perf issues? |
Pending CL - https://dart-review.googlesource.com/c/sdk/+/54743 |
@a-siva - @natebosch 's cl is breaking on the bots with:
I'm seeing similar with my DDC CL:
Any ideas? |
@vsmenon, are you running from |
Yes. |
@a-siva - I think we're blocked on this (and similar with DDC). It appears to be somewhat non-deterministic. Occasionally, DDC will build. Occasionally, it will fail with the "Kernel isolate" error. Occasionally (maybe just on bots), it will fail with the ".packages" error. Nate is seeing the same (we think) with pub. |
This CL https://dart-review.googlesource.com/c/sdk/+/55589 fixes the .package not found error but now an assertion in the optimizing compiler is being triggered which I am investigating. |
Spoke to @JekCharlsonYu, this was moved to Stable by mistake. |
https://dart-review.googlesource.com/c/sdk/+/55589 is being reviewed |
Fixed in 02e47a9 |
Spoke too soon. Waiting on https://dart-review.googlesource.com/c/sdk/+/54743 from @natebosch |
@a-siva I'm still unable to build locally.
Were you able to reproduce this error, did your CL fix it for you? |
the build error I'm seeing now might be flaky - it was for @vsmenon as well. I was able to get a successful build locally. |
- Make a snapshot in Dart 2 mode - Check for the VM argument `--preview-dart-2` and run the correct snapshot Towards fixing #32188 Change-Id: I56d5e7f268ff40b80783fae571981705536280f2 Reviewed-on: https://dart-review.googlesource.com/54743 Commit-Queue: Nate Bosch <[email protected]> Reviewed-by: Keerti Parthasarathy <[email protected]> Reviewed-by: Kevin Moore <[email protected]>
Hopefully fixed in 2ff2af7 |
We want dart-lang/pub#1683 to fix the performance issues, but we're unblocked to run things (from source) now. |
On Dart VM version: 2.0.0-dev.26.0 (Thu Feb 15 03:06:13 2018 +0100) on "macos_x64"
The text was updated successfully, but these errors were encountered: