-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Does both dartdev.dart.snapshot
and dartdev.dill
have to be included in the SDK?
#50504
Comments
I am not sure this fallback logic is worth it. I'd vote for removing it. |
Unless we can also remove the fallback logic for the kernel service, we need to keep this functionality. There's more details on the original issue for the dartdev fallback logic: #42804. |
Is there a fallback for the kernel service? There at least doesn't seem to be any dill included in the "snapshot" folder. |
Oh, maybe we got rid of it since then? |
We probably removed it because using isolate specific flags and pinning them for auxiliary isolates is a better way to fix this. (Users should not be touching most of these flags anyway - so shipping fallback kernel is just a waste of SDK binary size) |
@derekxu16 can I trouble you to take a look at this when you have a chance? |
This reverts commit c09f790. Reason for revert: CI failures Original change's description: > [VM/CLI] Remove dartdev.dill > > Incompatible VM flags will no longer break the CLI when running from an > AppJIT snapshot, so the fallback logic is no longer required. This CL > thus removes dartdev.dill and the fallback logic. > > Relevant past CLs: https://dart-review.googlesource.com/c/sdk/+/157601 > and https://dart-review.googlesource.com/c/sdk/+/178300 > > Fixes #50504 > > TEST=I tried running `out/ReleaseX64/dart --observe --sound-null-safety test.dart` > and `out/ReleaseX64/dart --observe --no-sound-null-safety test.dart` and > both worked. > > Change-Id: I5cdcfbccf71ec557964014fdb80733b4a7c76b4d > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274520 > Reviewed-by: Ben Konyi <bkonyi@google.com> > Commit-Queue: Derek Xu <derekx@google.com> TBR=bkonyi@google.com,derekx@google.com,dart-scoped@luci-project-accounts.iam.gserviceaccount.com Change-Id: I5117f990dfabf93f5a9bae56098831280845e84e No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275181 Reviewed-by: Ben Konyi <bkonyi@google.com> Commit-Queue: Derek Xu <derekx@google.com>
Removing |
I believe for the kernel service the dill file is part of the executable, see
|
I believe for some of the architrectures (simarm, simarm64, riscv etc.) the kernel_service snapshot is not built and on these platforms the dill file is used. |
Could we then not make the SDK bundling include the snapshot just on those, and not elsewhere? |
I guess you are saying if we generate a kernel_service or dartdev snapshot for an archtecture then we should not include the .dill file |
Yup. Remove the |
Inside the
out/ReleaseX64/dart-sdk/bin/snapshots/
directory we have bothdartdev.dart.snapshot
anddartdev.dill
. The testpkg/dartdev/test/load_from_dill_test.dart
talks about needing both because "The DartDev snapshot includes the --use_field_guards flag. If --no-use-field-guards is passed, the VM will fail to load the snapshot and should fall back to using the DartDev dill file."I asked @mraleph if the
--use-field-guards
thing it was true, considering is it then - apparently - only true for the dartdev snapshot as the built-in CFE is also - at least I think - a snapshot. @mraleph is of the opinion that (paraphrasing) the test is outdated and that the VM forces the isolate to use a specific set of options just like the kernel isolate.@bkonyi suggested the test should potentially be updated to correctly test the fallback logic.
So either
Again, considering
dartdev
is the only "snapshot" that is included as dill as well I'm - maybe naively? - thinking that one of the last two would/should be the way to go.The text was updated successfully, but these errors were encountered: