Skip to content

VM uses incorrect path for dill manifest when run from the same directory #37610

@natebosch

Description

@natebosch

If I create a dill manifest file with relative file paths and I run it with a working directory at least 1 level up from the manifest file it works - if my working directory is the same as the directory of the manifest file it does not work.

We're still unable to use the new feature from #33952

The kernel_list_dirname for input script_uri of try.vm.app.dart is try.vm.app.dart which can't be concatenated with a relative path. The kernel_list_dirname for input script_uri of bin/try.vm.app.dart is bin/ which can be concatenated with a relative path.

const char* kernel_list_dirname = DartUtils::DirName(script_uri);

I think we want to check whether we go the same result back and in that case use an empty prefix.

Some other things that made this difficult to track down:

  • If anything goes wrong we bail out and attempt to parse as a Dart file. #@dill will never be the leading content of a valid Dart file as far as I know - so it's not very useful to have this behavior once we see the magic number for a dill manifest.
  • The end of the file must be \n. A missing trailing newline, or an extra blank line (\n\n) cause it to consider it an invalid kernel manifest and fall back to parsing as Dart.

Metadata

Metadata

Assignees

Labels

area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions