Skip to content

[VM] Auto-detection of null-safety mode doesn't work for AOT snapshots #42421

@alexmarkov

Description

@alexmarkov
$ pkg/vm/tool/precompiler2 --enable-experiment=non-nullable --null-safety foo.dart foo.snapshot

$ pkg/vm/tool/dart_precompiled_runtime2 foo.snapshot
VM initialization failed: Snapshot not compatible with the current VM configuration: the snapshot requires 'release no-dwarf_stack_traces_mode causal_async_stacks no-lazy_async_stacks use_bare_instructions no-dedup_instructions no-"asserts" no-code-comments x64-sysv null-safety' but the VM has 'release no-dwarf_stack_traces_mode causal_async_stacks no-lazy_async_stacks use_bare_instructions no-dedup_instructions no-"asserts" no-code-comments x64-sysv no-null-safety'

$ pkg/vm/tool/dart_precompiled_runtime2 --null-safety foo.snapshot
Hello, Dart!

/cc @a-siva

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD Releasearea-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions