Closed aantron closed 5 years ago
I also merged master
into this branch to resolve the merge conflict, assuming that you would merge by squash anyway. I'm happy to rewrite the history in any way, if not.
I've made guess_file_kind
return Kind_unknown
when the extension is unknown, this way the assert false
disappears.
Thanks, that seems like a nice improvement. BTW, you might want to reproduce this change to ocaml-ppx/ppx at some point. The plan is that eventually it will replace the ocaml-migrate-parsetree driver entirely.
Relaxes the driver command line parser so that if an input file is not specified with
--intf
or--impl
, but as an anonymous argument, and turns out to be a binary AST, the file kind is loaded from the file contents. Previously, the parser tried to guess the file kind from the extension. The extension is ignored completely now.This helps with BuckleScript integration, because current BuckleScript produces temporary binary AST files with no extension.