-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
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.
Line 442 in 2ada1ed
| 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.
#@dillwill 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.